VB Syntax to close Excel workbook not saving changes

G

Greyman

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top