02-23-2011, 12:25 PM
I am not sure what code you are using.However i can give you some idea of how to use error handling in vbscript
on error resume next ' this means that if an error occurs the execution will not stop and proceed to the next line
< lines of code which would raise the error>
if err.number <> 0 ' which means that some error has occurred
msgbox err.description
else ' this condition is reached if no error has occurred
<your code logic if no error occurs>
on error goto 0 ' this stops your error handling code
please let me know if you have problem in understanding this code.
on error resume next ' this means that if an error occurs the execution will not stop and proceed to the next line
< lines of code which would raise the error>
if err.number <> 0 ' which means that some error has occurred
msgbox err.description
else ' this condition is reached if no error has occurred
<your code logic if no error occurs>
on error goto 0 ' this stops your error handling code
please let me know if you have problem in understanding this code.