thetambarineman
Technical User
Having some problems with my code-
can anyone suggest whats going wrong with it??
the error handler calls this sub and passes some global variables - errnum, errdescript & errsource
Whats happening is that when an error does occur i get a run time error 55 - file already open
-can anyone suggest a way to get around this??
Public Sub sendbugreport()
Open "C:\Program Files\Agswe\System Files\errorlog.txt" For Append As 1
Print #1, errnum & " " & errdescript & " " & errsource & " " & Now
Close #1
Set mailapp = CreateObject("Outlook.application"
Set email = mailapp.createitem(mailitem)
Set recepient = email.Recipients.Add("Paul.mclornan@btinternet.com"
email.Subject = "AGSwe code error..."
email.body = "An error has occurred in the program code.. Please send this to the developers to help future updates.."
Set attach = email.attachments.Add("C:\program files\agswe\system files\errorlog.txt"
email.Display
End Sub
Thanks in advance...
Paul
can anyone suggest whats going wrong with it??
the error handler calls this sub and passes some global variables - errnum, errdescript & errsource
Whats happening is that when an error does occur i get a run time error 55 - file already open
-can anyone suggest a way to get around this??
Public Sub sendbugreport()
Open "C:\Program Files\Agswe\System Files\errorlog.txt" For Append As 1
Print #1, errnum & " " & errdescript & " " & errsource & " " & Now
Close #1
Set mailapp = CreateObject("Outlook.application"
Set email = mailapp.createitem(mailitem)
Set recepient = email.Recipients.Add("Paul.mclornan@btinternet.com"
email.Subject = "AGSwe code error..."
email.body = "An error has occurred in the program code.. Please send this to the developers to help future updates.."
Set attach = email.attachments.Add("C:\program files\agswe\system files\errorlog.txt"
email.Display
End Sub
Thanks in advance...
Paul