Close file

  • Thread starter Thread starter mb
  • Start date Start date
M

mb

How do I close a file without saving the changes? I am using
ActiveWorkbook.close - is there a parameter I can add onto the end of this
statement?

MB
 
You can either set

application.displayalerts to false

or there is the specific setting of

ActiveWorkbook.saved = true which, if set without having actually saved
the file, causes Excel to quit without prompting...

Hope these help

David
 
Sub CloseMe()
ActiveWorkbook.Close SaveChanges:=False
End Sub

The 'False' bit tells it not to save before closing
 
Back
Top