#1   Report Post  
Posted to microsoft.public.excel.programming
mb mb is offline
external usenet poster
 
Posts: 2
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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


.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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


.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to close file and hibernate? Eric Excel Discussion (Misc queries) 2 May 4th 10 07:44 PM
Date to close file PSM[_20_] Excel Worksheet Functions 2 November 23rd 09 08:50 AM
vlookup on close file Dan Excel Worksheet Functions 2 June 3rd 08 03:47 PM
Everytime i close an excel file, it creates a new backup file p Excel Discussion (Misc queries) 3 November 22nd 07 08:13 AM
Automate open file, update links, run macro, close and save file Geoff[_7_] Excel Programming 2 August 26th 03 10:13 PM


All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"