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.misc
external usenet poster
 
Posts: 22,906
Default halt a subroutine question

The stopping condition would have to be written into the called routine.


Gord Dibben MS Excel MVP

On Sun, 28 Dec 2008 19:03:16 -0000, "teepee" wrote:


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


  #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
Halt Rest of Macro after Error €“ Jim Cone review Jenny B. Excel Discussion (Misc queries) 2 January 12th 08 03:11 AM
VLOOKUP returns #N/A and causes VBA routine to halt [email protected] Excel Worksheet Functions 1 September 4th 07 04:42 PM
SUBROUTINE HELP biker man Excel Discussion (Misc queries) 1 July 28th 07 04:06 PM
No RETURN() or HALT() function found on macro sheet [email protected] Excel Discussion (Misc queries) 3 September 26th 06 03:35 PM
How do I exit a macro subroutine? John Excel Worksheet Functions 1 January 15th 06 02:08 AM


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