How to supress a Save prompt?

  • Thread starter Thread starter TBA
  • Start date Start date
T

TBA

Excel 2000
Windows 2k Pro

I was hoping I could put some code in the Workbook_Close event handler that
would suppress any save prompts. Can this be done, and if so, how?

TIA

-gk-
 
You could try adding the following lined of code to the Workbook_BeforeClose
event handler. Remember though, if you make any changes you'd like to keep,
you must save before closing, else your changes will all be lost.

ThisWorkbook.Saved=True

D.S.
 
three ways at least to do this:
(1)
Workbooks(SomeWorkbook).Close False
' false sats don't save

(2)
Application.DisplayAlerts = False
Workbooks(SomeWorkbook).Close
Application.DisplayAlerts = True

(3)
Workbooks(SomeWorkbook).Saved = True
Workbooks(SomeWorkbook).Close


Patrick Molloy
Microsoft Excel MVP
 
Back
Top