ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Close file (https://www.excelbanter.com/excel-programming/286695-close-file.html)

mb

Close file
 
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



David Coleman

Close file
 
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


"mb" wrote in message
...
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





Ron de Bruin

Close file
 
Hi mb

ActiveWorkbook.Close SaveChanges:=False


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"mb" wrote in message ...
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





Ken Wright

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

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

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
Best wishes to all, and hope for a good New year :-)
----------------------------------------------------------------------------



"mb" wrote in message
...
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




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 30/12/2003



No Name

Close file
 

You can write :

ActiveWorkbook.Close False

Juha

-----Original Message-----
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


.


wolf

Close file
 
Hi MB

ActiveWorkbook.close savechanges:=false

Wolf
-----Original Message-----
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


.




All times are GMT +1. The time now is 06:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com