Login | |
|
 |
RE: Error Message - 4/12/2007 1:15:21 AM
|
|
 |
|
| |
ebgreen
Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
|
That is probably more error checking than I would put in but there isn't really any inherent reason not to. The only thing that I would say is that the normal way that I do this is to not use a global On Error Resume Next. Instead I put On Error Resume Next right before a line that I think might fail. Then after I check the value of Err.Number, I will put On Error Goto 0. This way if there is some error that you did not expect then you will actually see the error instead of having the error masked by a global On Error Resume Next.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Error Message - 4/13/2007 12:22:07 AM
|
|
 |
|
| |
ebgreen
Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
|
Basicly On Error Resume Next makes the script try to run every line just like it normally does. It just means that if the line errors then it will just ignore the error and go on to the next line of execution. As for the error, your Error routine is a Sub so when you call it you need to remove the () so this line: Error(Err.Number, Err.Description, Err.Source) Should be: Error Err.Number, Err.Description, Err.Source
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|