B
Beeawwb
Hi again,
Is there any way to create error handling that doesn't live inside your
original module? What I'd like to do is be able to add error handling that
lives outside my module, and can be easily updated.
For example, let's say that a new error is given to me by my users. I work
out what the error handling needs to be (e.g. ErrorMsg = MsgBox("Error
number: " & Err.Number & " - Document is locked by password." & vbCrLf &
"Please unprotect manually.", vbCritical, "Error!")) and then I can add this
to my error handling without updating the module itself. I update the
external file (which isn't in use)
I've got another thread open on PrivateProfileString, but I don't think it's
appropriate in this case. While I could use it to get custom error messages
(e.g. ErrorMsg =
System.PrivateProfileString("H:\Errorlist.ini",Err.Number,"Message") I
couldn't actually assign specific handling to the error. (That is, I couldn't
do like a Case statement, whereby it checks Err.Number against the case, and
when a case is found, runs specific code)
Any thoughts?
Thanks again,
Bob
Is there any way to create error handling that doesn't live inside your
original module? What I'd like to do is be able to add error handling that
lives outside my module, and can be easily updated.
For example, let's say that a new error is given to me by my users. I work
out what the error handling needs to be (e.g. ErrorMsg = MsgBox("Error
number: " & Err.Number & " - Document is locked by password." & vbCrLf &
"Please unprotect manually.", vbCritical, "Error!")) and then I can add this
to my error handling without updating the module itself. I update the
external file (which isn't in use)
I've got another thread open on PrivateProfileString, but I don't think it's
appropriate in this case. While I could use it to get custom error messages
(e.g. ErrorMsg =
System.PrivateProfileString("H:\Errorlist.ini",Err.Number,"Message") I
couldn't actually assign specific handling to the error. (That is, I couldn't
do like a Case statement, whereby it checks Err.Number against the case, and
when a case is found, runs specific code)
Any thoughts?
Thanks again,
Bob