ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   exiting program (https://www.excelbanter.com/excel-programming/334651-exiting-program.html)

PLPE[_17_]

exiting program
 

Hi,

I have a subroutine in which i am using an if statement. If case is not
satisfied, exit sub. - I'd like to change this to *exit program * or
*terminate program execution*.

At the moment, I'm using "Exit Sub", but I am going to nest this sub
within another.

Is there a similar command to exit the program


--
PLPE
------------------------------------------------------------------------
PLPE's Profile: http://www.excelforum.com/member.php...o&userid=23856
View this thread: http://www.excelforum.com/showthread...hreadid=387509


Earl Kiosterud

exiting program
 
PLPE,

Presumably, you want to totally quit Excel.

If A = B then
Application.Quit
End If

There may be messages about saving unsaved files and stuff. See the help on
the Quit method (put cursor at Quit and press F1) for some information on
that.
--
Earl Kiosterud
www.smokeylake.com

"PLPE" wrote in message
...

Hi,

I have a subroutine in which i am using an if statement. If case is not
satisfied, exit sub. - I'd like to change this to *exit program * or
*terminate program execution*.

At the moment, I'm using "Exit Sub", but I am going to nest this sub
within another.

Is there a similar command to exit the program


--
PLPE
------------------------------------------------------------------------
PLPE's Profile:
http://www.excelforum.com/member.php...o&userid=23856
View this thread: http://www.excelforum.com/showthread...hreadid=387509




PLPE[_18_]

exiting program
 

thanks Earl


--
PLPE
------------------------------------------------------------------------
PLPE's Profile: http://www.excelforum.com/member.php...o&userid=23856
View this thread: http://www.excelforum.com/showthread...hreadid=387509



All times are GMT +1. The time now is 04:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com