Link to home
Start Free TrialLog in
Avatar of isischen
isischen

asked on

Word 2003: How can I terminate a macro?

I want to terminate my application prematurely after the condition of an IF...THEN...END IF is met.  What code can I use?  Once I saw VBA use something like APPLICATION.CLOSE.  But there's no such method exist! ( I think my memory is weak.)
Avatar of UINVDJM
UINVDJM

Off the top of my head...

If <your condition here> then exit sub  'no need for end if when you limit to one line!


HTH
Darren
ASKER CERTIFIED SOLUTION
Avatar of KennyLowe
KennyLowe
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Apologies, you want to quit the application, not the macro.

as per Kenny, application.quit should work!?