Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default halt a subroutine question


In the same way that you can start a second sub from within a sub by using
the command

call mymacro

is there a corresponding command to then stop that subroutine?

Should be obvious but I'm struggling with the answer


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default halt a subroutine question


Hello teepee,

Once a Sub is running it can be stopped either internally by the code
checking for a certain condition, or externally by using the key
combination *CTRL+Break* The break key may also be labeled *Pause*.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.thecodecage.com/forumz/member.php?userid=75
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=44651

  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default halt a subroutine question

Hi,

If you are running macroX and you want it to stop based on some condition

If x then Exit Sub

where x is the condition that triggers the macro to stop.

If this helps, please click the Yes button

cheers,
Shane Devenshire

"teepee" wrote in message
...

In the same way that you can start a second sub from within a sub by using
the command

call mymacro

is there a corresponding command to then stop that subroutine?

Should be obvious but I'm struggling with the answer

  #4   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default halt a subroutine question

Thanks for the answers. Much appreciated


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
Call a subroutine using variable subroutine name dhstein Excel Discussion (Misc queries) 3 July 26th 09 08:28 PM
halt a subroutine question teepee[_3_] Excel Discussion (Misc queries) 3 December 28th 08 09:23 PM
How To Quit Subroutine from a called subroutine Rich J[_2_] Excel Programming 5 February 20th 07 06:48 PM
Subroutine question and public variables musictech Excel Programming 1 July 1st 05 09:29 PM
Halt recalculation ojv[_2_] Excel Programming 0 January 19th 05 11:47 PM


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