Close file

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
 
D

David Coleman

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
 
K

Ken Wright

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

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