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

Quitting excel without saving message???

Status
Not open for further replies.

Phailak

Programmer
Apr 10, 2001
142
CA
Hail,

I'm kind of new to VBA so here goes...
I just want to quit excel application after having printed the data I pasted there. Now when I call xlSheet.quit, it prompts the user to save Yes, no or cancel but I don't want that message since the user never sees excel in the first place.
Any help?

Phailak
 
Try this:
Code:
Application.DisplayAlerts = False
Application.Quit

Hope this helps!
 
Alternatively you can use:

ActiveWorkbook.Saved = True

This will make Excel think that the workbook has already been saved and so it doesn't ask the question.
 

Store300
:

When all else fails we can always trick Excel into thinking only what we want it to think. ;-)

A very original idea! I'll remember that one.

Regards,

LoNeRaVeR
 
LoNeRaVeR:

Thank you
happy.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top