I have an error handling routine that traps the first occurance of a RunTime error 5. I have cleared the error number however every other time the error is encountered the I have a choice to debug or end.
Any ideas?
Printable View
I have an error handling routine that traps the first occurance of a RunTime error 5. I have cleared the error number however every other time the error is encountered the I have a choice to debug or end.
Any ideas?
It happens repeatedly?! So where does the error happen?Quote:
Invalid procedure call or argument (Error 5)
Some part of the call can't be completed. This error has the following causes and solutions:
An argument probably exceeds the range of permitted values. For example, the Sin function can only accept values within a certain range. Positive arguments less than 2,147,483,648 are accepted, while 2,147,483,648 generates this error.
Check the ranges permitted for arguments.
This error can also occur if an attempt is made to call a procedure that isn't valid on the current platform. For example, some procedures may only be valid for Microsoft Windows, or for the Macintosh, and so on.
Check platform-specific information about the procedure.
I fail to see the need to trap this particular error if you provide the proper arguments for the procedures. You can easily write code that ensures the proper arguments are passed.
As to the second case, you can either use a procedure that works on any/most platforms or simply end the program if its an important procedure that can't be called.