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: 1
Default how to exit sub


I got a macro something like
sub format()
application.run "Myworkbook.xls!import"
application.run "Myworkbook.xls!delrow"
application.run "Myworkbook.xls!delcol"
application.run "Myworkbook.xls!sort"
end sub

private sub import()
........
end sub
private sub delrow()
........
end sub
private sub delcol()
........
end sub
private sub sort()
........
end sub

the firest private sub is trying to open dialog box b
GetOpenFilename.
this macro runs good. My question is how can I exit the main sub when
the user click "cancel" button in openfile-dialog box rather than onl
exit the first private sub.

any help would be appreciate

--
xian
-----------------------------------------------------------------------
xiang's Profile: http://www.excelforum.com/member.php...fo&userid=2948
View this thread: http://www.excelforum.com/showthread.php?threadid=49207

 
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
Exit Sub Jeff Excel Discussion (Misc queries) 2 March 1st 08 06:21 PM
Exit when its a Mac Tushar Mehta Excel Programming 0 September 21st 04 03:41 PM
Exit when its a Mac jose luis Excel Programming 0 September 20th 04 10:47 PM
If a called sub exit, how to the caller exit right away? luvgreen[_4_] Excel Programming 4 February 24th 04 05:06 PM
Exit Sub? Eva Shanley[_2_] Excel Programming 3 December 24th 03 02:15 PM


All times are GMT +1. The time now is 02:03 AM.

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

About Us

"It's about Microsoft Excel"