See in-line tests:
"Jitu>>" <ji*******@hotmail.com> wrote in message
news:u%***************@TK2MSFTNGP10.phx.gbl...
Hi All,
I've a query on On Error Resume Next. I've explained what I understand for
each case, I'm not sure that this is true.
Case:
1] Used in Function/Sub: will resume to the next statement in the
function or sub; but will not affect the error out side of the functions
Call Test()
response.write 1/0
Sub Test()
On error resume next
x = 1/0
End Sub
2] Used at the top of the asp page: will affect all the page code and
will not affect the function/sub in the page at all.
On Error Resume Next
Call Test()
response.write 1/0
Sub Test()
x = 1/0
End Sub
3] Used in the page where ever required: ????
Not sure what you mean by this, unless you're talking about using it on the
fly. You can do that like this:
a = 1
b = 0
On Error Resume Next
Response.Write a/b
On Error Goto 0
Response.Write a/b
''An error will be raised on the second division by zero. On Error Resume 0
turns off the Resume Next option
Ray at home