On error

T

Todd Huttenstine

Is "On error exit sub" valid? I am trying to use that and VBA does not like
that...

Todd
 
J

JE McGimpsey

Did you look at the Help, Todd?

You can use a label just before the end of the sub:

On Error GoTo Exit_Sub
'do stuff
Exit_Sub:
End Sub
 
T

Todd Huttenstine

oh ok thanks. Yeah I just used a label but for some reason I thought on
error exit sub was an actual command.
 
Top