GetLastError must be a next callable statement after the error statement. Please move "dim message, string" to the top of the script. : Hi, : I am trying to capture the reason a job goes to the error routine. : I have the following code : OnErrorGoto Error_send_message : open a non existing file : error_send_message: dim message, string : GetLastError message : messagebox message : But the message box show empty. : In the tracelog window the information reported there is Error: file not : found. : How do I capture the same error displayed in trace log window and have it : sent to my messagebox? Can I have the trace log automatically generated : and sent to a file when the script runs? : Thank you : ~Joe
|