How can we get rid of the "Save" pop up box at the end of application?

  • Thread starter Thread starter kenji4861
  • Start date Start date
K

kenji4861

Whenever the user closes the excel sheet, it pops up an "save?" pop up.
Is there a way to get rid of this?
 
It should only ask that question if it thinks you have
altered data on the sheet.

The only way around this is to write a macro and place a
button on the sheet that would close the sheet with one
click without asking to save it first. You may be able to
use an auto_Run macro to tell the sheet that you have
already saved it and don' ask again.

If you know how to do macros, the magic code is.

sub CloseSheet()
activeworkbook.saved = True
application.quit
End Sub

Just create a botton on the sheet and assign this macro to
it.
 
You can automate this by putting some code into the Before Close even
routine (double click 'ThisWorkbook' in the VB Editor). The followin
discards any changes made (but does not prevent users saving beforehan
:-

'-------------------------------------------------
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
ThisWorkbook.Close
End Sub
'------------------------------------------------
 
Back
Top