I need to output all of the information on an error that has occured to a msgbox and a log text file. My current code only outputs a message that tells the user an error has occurred. I need actualy error information to be displayed in short in the msgbox and a more detailed explanation in a log file.
I would just like to add I am using TestPartner for this script and it uses VBScript as its language so the concepts are similar to those in VB6.
This is my code currently:
Private Sub CmdPOstart_Click()
errorcount = 0
On Error GoTo ErrorHandler
'Do stuff...
ErrorHandler:
errorcount = errorcount + 1 'Add 1 to the error count
'Output the error information to a msgbox
MsgBox ("An Error Occurred! " & errorcount & " Errors ")
Exit Sub
End Sub
Thanks in advance.
On Error Gotois not supported in VBScript. This is an example of the important differences between VB6 and VBScript that I mentioned above.