Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pls have a look at the code below..

Status
Not open for further replies.

krishbanerjee

Programmer
Joined
May 6, 2002
Messages
5
Location
IN
pls have a look at the code below....

Private Sub Command1_Click()
On Error GoTo errtrap
For i = 0 To 2
Err.Raise 2000, "Src", "Error " & i
l1:
MsgBox i
Next i
Exit Sub
errtrap:
Err.Clear
GoTo l1
End Sub

the process requiremnt is that whenever a error ocurs we need to handle that and resume execution from the next iteration in the loop....so we can't use the "On Error Resume Next" ....so we had a structure like the above code....the problem with it is that...its trapping the error for the first time the error occurs...but when it goes for the next iteration of the loop it couldnt trap the error....help required...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top