Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Macros

Status
Not open for further replies.

Dealer

Technical User
Joined
Nov 13, 2002
Messages
1
Location
US
PLease i need help. I need to find code to put into a macro that will exit out of Excel when clicked/run. Can anyone polease help. i want basic code, nothing too complicated. Ive tried End, Exit, non of these work. PLease reply, i have to find a soloutio within 24 hours or im roasted.

Shmail
 
All I know is how to close the active workbook :

ThisWorkbook.Saved = True
ActiveWorkbook.Close (False)

I do not know how to exit Excel from a macro, sorry.
 
Looky what I found :


ThisWorkbook.Saved = True
Application.Quit
 
The danger here is that it will shutdown excel without saving the active workbook. To avoid this you could use:

ActiveWorkbook.Save or Workbooks("MyWorkbookName.xls").Save
Application.Quit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top