Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a sub routine called "Main" that calls routine "FindIt". Within
"Findit" I have some I am looking for arouse things. If I don't find it I want to exit out not just "Findit", but also "Main". Is there an simple way (one command) to do this besides setting a flag in "Findit" and checking it in "Main"? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() You could change FindIt to a function and read the return value from the function. The other much less desirable method is to place the single word "End" in your code when you want to shut everything down. Be sure to read the help file on the End statement before using it. '--- Sub Main() 'do stuff If FindIt() Then Exit Sub 'do more stuff End Sub '--- Function FindIt() As Boolean Dim strWord As String 'do stuff FindIt = Len(strWord) = 0 End Function -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "jutlaux" wrote in message I have a sub routine called "Main" that calls routine "FindIt". Within "Findit" I have some I am looking for arouse things. If I don't find it I want to exit out not just "Findit", but also "Main". Is there an simple way (one command) to do this besides setting a flag in "Findit" and checking it in "Main"? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I make Command button ( Save & Exit) for Excel | Excel Programming | |||
Intercepting Save and Exit menu command in Excel | Excel Programming | |||
How do i create a command button or macro to exit Microsoft Excel | Excel Worksheet Functions | |||
If a called sub exit, how to the caller exit right away? | Excel Programming | |||
On Exit Command | Excel Programming |