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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA - how to exit excel? 1

Status
Not open for further replies.

Rigger123

Technical User
Mar 19, 2004
40
Hi, im new to VBA and i was wondering if anyone could tell me the code for exiting excel. so far ive been using | Application.Quit | but i then get the dialog box "do you want to save changes to excel" (which i want to say no to) but have had no luck so far at avoiding this. any help greatly appreciated.
 
Adnane This was exactly what i wanted, have a star.

He who smiles in a crisis has found someone to blame.
 
Another solution:

Private Sub ThisWorkBook_BeforeClose(Cancel As Boolean)
ThisWorkBook.Saved = True
End Sub

Greets Jajinder
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top