Thread: Exit-quit sub
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Exit-quit sub

You can use the End statement to terminate all running VBA code.
Note that this will reset all global variables to their default
values.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Tom" wrote in message
...
Hello,

if I have many sub like this:

Sub macro1()
....
macro2 (calling macro2)
....
End sub()

Sub macro2()
....
exit-quit ???
....
End sub()

And in macro2 I need quit-exit all subs, not only macro2 (like
Exit sub can do it), can you help me?

tom