Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Exiting a procedure with a userform


hi guys

I want to exit my procedure(which is at that point within a loop) when
I press the cancel button on my user form.
Is there a predefined command which will execute the action? Or do I
have to write a code for that.
Please let me know if u have an answer


--
jumpjump
------------------------------------------------------------------------
jumpjump's Profile: http://www.excelforum.com/member.php...o&userid=26568
View this thread: http://www.excelforum.com/showthread...hreadid=400335

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Exiting a procedure with a userform


Here is some commands that may help you

You will need to attach the code to the cancel button

Exit Do - exit do loop - macro keeps running from code at end of d
loop
Exit For - exit for loop - macro keeps running from code at end of fo
loop
Exit Sub - exit sub routine - if sub routine is called from anothe
macro the macro will continue to run from the calling macro
Exit Function - exit function routine - same as exit sub

End - ends macro from runnin

--
mudrake
-----------------------------------------------------------------------
mudraker's Profile: http://www.excelforum.com/member.php...nfo&userid=247
View this thread: http://www.excelforum.com/showthread.php?threadid=40033

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Exiting a procedure with a userform

If you are going to exit a running procedure, you will need to allow the
other events

--

HTH

RP
(remove nothere from the email address if mailing direct)


"jumpjump" wrote in
message ...

hi guys

I want to exit my procedure(which is at that point within a loop) when
I press the cancel button on my user form.
Is there a predefined command which will execute the action? Or do I
have to write a code for that.
Please let me know if u have an answer


--
jumpjump
------------------------------------------------------------------------
jumpjump's Profile:

http://www.excelforum.com/member.php...o&userid=26568
View this thread: http://www.excelforum.com/showthread...hreadid=400335



Reply
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
Cancel a Procedure through a Userform jumpjump[_3_] Excel Programming 1 August 30th 05 09:52 AM
Aborting a Sub procedure from a UserForm shellshock[_3_] Excel Programming 4 August 1st 05 01:24 PM
userform output to procedure shellshock Excel Programming 2 July 29th 05 11:31 PM
Looping procedure calls userform; how to exit loop (via userform button)? KR Excel Programming 6 July 27th 05 12:57 PM
Userform maintaining items in list box after exiting Excel Ligaya Excel Programming 2 December 2nd 04 03:25 PM


All times are GMT +1. The time now is 04:16 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"