event handling

P

placek

Hi there

I am getting a Resume without error (20) error when i run
my code, despite

1) My resume statement being contained within the error,
and
2) My line labels are spelt correctly.

Here is my code (part of):

On Error GoTo Err_Reserve_Click

..
..
..
..
Err_Reserve_Click:
MsgBox Err.Number & " " & Err.Description
Resume Exit_Reserve_Click

Exit_Reserve_Click:
Exit Sub

I assume there is some obvious mistake i am missing. Can
someone please point it out.

Many thanks, Martin
 
W

Wayne Morgan

The Exit_Reserve_Click should be before the Err_Reserve_Click. This will
allow you to exit the sub before you get to Err_Reserve_Click unless you
have an error. If you have an error then Err_Reserve_Click will resume at
Exit_Reserve_Click and exit the sub.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top