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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code to stop an excel macro

Status
Not open for further replies.

davidandrews8

Technical User
Mar 9, 2001
5
GB
Does anyone know the line of code I could use to stop an Excel macro in my IF statement
 
If you are using a form:
Code:
Unload Me
End
 
Or in case you want to continue the code if the condition is false:

If condition then
...
Exit Sub ' or "Exit Function", if it's a function
Else
...
End if

...

End Sub ' or "Function"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top