View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Cancel button to cancel the whole macro

Why not just Unload the other from as well?

--
HTH

RP
"excelnut1954" wrote in message
ups.com...
I have UserForm1, that when completed, and the user clicks the OK
button, opens up UserForm2.
I also have a Cancel option in UserForm1.

Right now, if Cancel is clicked, the macro will still continue on to
UserForm2. That's because the only code I have in the Cancel sub is to
close UserForm1.

I want it to stop the whole macro when Cancel is selected.
What is the correct code I should enter in the Cancel sub to make the
whole macro stop?

Thanks,
J.O.