View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Greyman Greyman is offline
external usenet poster
 
Posts: 1
Default VB Syntax to close Excel workbook not saving changes

In Excel 2000, I want to automate closing a file without saving changes.
This code does not give any error messages, but closes and does in fact save
the changes:

Sub DoNotSaveChanges()
'
' DoNotSaveChanges Macro
' Macro recorded 5/07/2008 by Grahame McEnery
'

'
ActiveWorkbook.Close (SaveChanges = False)
End Sub