[dba-Tech] Excel VBA -- don't save

Dan Waters df.waters at comcast.net
Fri Sep 3 14:56:40 CDT 2010


Hi Susan,

I this that this command only closes the workbook, and that you need another
command to close Excel.

How about DoCmd.Quit?

Dan

-----Original Message-----
From: dba-tech-bounces at databaseadvisors.com
[mailto:dba-tech-bounces at databaseadvisors.com] On Behalf Of Susan Harkins
Sent: Friday, September 03, 2010 5:40 PM
To: Discussion of Hardware and Software issues
Subject: [dba-Tech] Excel VBA -- don't save

I'm using the procedure included below in an Excel worksheet, to keep Excel
from saving any changes -- when the user clicks Close, I want Excel to close
without saving changes and without asking if the user wants to save changes.
This doesn't seem to work. 

Sub CloseActiveWBNoSave()
  'Close the active workbook without saving.
  ActiveWorkbook.Close False
End Sub

Any help? 

Susan H. 
_______________________________________________
dba-Tech mailing list
dba-Tech at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-tech
Website: http://www.databaseadvisors.com




More information about the dba-Tech mailing list