LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Cancel button to cancel the whole macro

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.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get userform Cancel button to invoke Exit Sub in calling macro? Craig Remillard New Users to Excel 1 November 19th 09 03:55 AM
Workbook_BeforeClose(Cancel As Boolean) - Cancel won't work gpmichal Setting up and Configuration of Excel 1 May 12th 09 02:33 AM
Cancel Macro is user selects 'cancel' at save menu Mark Excel Programming 1 April 6th 05 05:45 PM
Cancel Button Matt Excel Programming 3 February 3rd 04 11:23 PM
Button To Cancel Macro Bill Lunney Excel Programming 0 July 16th 03 10:27 PM


All times are GMT +1. The time now is 11:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"