Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 130
Default VBA - Close without saving changes

The system runs several reports each night, and I have a macro that opens the
report it needs automatically, uses the data, then closes the report.
Even in cases where all i've done is copy data from this report it asks me
occasionally if I want to save changes. Sometimes I do make changes.

Is there a way in a macro that I can set it to automatically close a file
without either saving it, or prompting me?
Any changes to these reports doesn't want to be saved so they can be used by
other people, and I generally like the prompt on a usual basis, but its one I
would rather be without while a macro is running.

Anything I can put before
ActiveWindow.Close
Or in it, or something like that?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default VBA - Close without saving changes


PaulW wrote:

Anything I can put before
ActiveWindow.Close
Or in it, or something like that?


Hi PaulW

ActiveWorkbook.Close 0

Regards

Steve

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 180
Default VBA - Close without saving changes

ActiveWindow.Close savechanges:=False


"PaulW" wrote:

The system runs several reports each night, and I have a macro that opens the
report it needs automatically, uses the data, then closes the report.
Even in cases where all i've done is copy data from this report it asks me
occasionally if I want to save changes. Sometimes I do make changes.

Is there a way in a macro that I can set it to automatically close a file
without either saving it, or prompting me?
Any changes to these reports doesn't want to be saved so they can be used by
other people, and I generally like the prompt on a usual basis, but its one I
would rather be without while a macro is running.

Anything I can put before
ActiveWindow.Close
Or in it, or something like that?

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
Why excel close all files when I just want to close one files hon123456 Excel Discussion (Misc queries) 2 December 8th 10 12:12 PM
close workbook without closing excel and stop recursive function chris Excel Discussion (Misc queries) 3 July 10th 06 08:23 PM
Am i the first person to close and excel file, without saving chan Cjbrad Excel Discussion (Misc queries) 3 March 2nd 06 07:58 PM
close button does not close goplayoutside Excel Discussion (Misc queries) 1 October 11th 05 03:42 PM
Excel shoud not close all active books when clicking close button technomike Excel Discussion (Misc queries) 0 June 10th 05 05:35 PM


All times are GMT +1. The time now is 12:24 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"