MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Automatic exit without saving a workbook

Posted by Dennis on June 07, 2001 7:28 AM

I have a workbook with static data (for the most part). There are a few worksheets dedicated to calculations and reports but this data does not need to be saved. I would like to know if anyone knows of a way to exit an Excel application without a user being prompted to save the file.

Thank you.

Posted by Tuc on June 07, 2001 7:39 AM

Create a macro that has the following command
Activeworkbook.close SaveChanges:=False

Posted by Dwight on June 07, 2001 9:08 AM

Similarly, here's a macro to save & close

Sub SaveAndClose()
End Sub

Posted by Dennis on June 07, 2001 1:58 PM

Thanks everyone.... works great!!!