During a process, I am creating a logfile to capture all the errors.
After the process is done, I would like to display the logfile to show the user.
I am able to write to the file and append it when neccessary, I am just not sure on how to open the file to display it to the user.
Do anyone know how to do this?
These are two functions I use..I need to create the display function
Public Function CreateLogFile()
gblLogFileName = "G:/test/Log/" & GetUserName & Format(Now, "_yyyymmdd_nn.ss") & ".txt"
End Function
Sub LogInformation(LogMessage As String)
Dim FileNum As Integer
FileNum = FreeFile ' next file number
Open gblLogFileName For Append As #FileNum ' creates the file if it doesn't exist
Print #FileNum, LogMessage & _
"| Module : " & gblModuleName & _
"| Form : " & gblFormName ' write information at the end of the text file"
Close #FileNum ' close the file
End Sub
After the process is done, I would like to display the logfile to show the user.
I am able to write to the file and append it when neccessary, I am just not sure on how to open the file to display it to the user.
Do anyone know how to do this?
These are two functions I use..I need to create the display function
Public Function CreateLogFile()
gblLogFileName = "G:/test/Log/" & GetUserName & Format(Now, "_yyyymmdd_nn.ss") & ".txt"
End Function
Sub LogInformation(LogMessage As String)
Dim FileNum As Integer
FileNum = FreeFile ' next file number
Open gblLogFileName For Append As #FileNum ' creates the file if it doesn't exist
Print #FileNum, LogMessage & _
"| Module : " & gblModuleName & _
"| Form : " & gblFormName ' write information at the end of the text file"
Close #FileNum ' close the file
End Sub