Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default closing file without saving

How can I close a file without saving the file automatically.
I use the following code for closing the file:
Windows("MasterData - 2009.XLS").Activate
ActiveWindow.Close

is any thing I can add to it or change so I don't get the "Do you want to
say" box? I never want to save the file.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default closing file without saving

I'm having the same problem with a strange twist. I'm closing another
workbook, then the current workbook with the following code in Private Sub
workbook_close():

Workbooks("real1.xls").Close False
Me.Close False

When I step through the code or run the code from the debug toolbar it
works. But when I use File Exit or the X, it asks whether or not I want to
save both files. I don't want to save either. What am I doing wrong?

"Jacob Skaria" wrote:

ActiveWindow.Close False

--
If this post helps click Yes
---------------
Jacob Skaria


"Novice Lee" wrote:

How can I close a file without saving the file automatically.
I use the following code for closing the file:
Windows("MasterData - 2009.XLS").Activate
ActiveWindow.Close

is any thing I can add to it or change so I don't get the "Do you want to
say" box? I never want to save the file.

Thanks

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
closing file without saving Novice Lee Excel Programming 0 April 17th 09 03:12 PM
closing file without saving Dave Peterson Excel Programming 0 April 17th 09 02:55 PM
closing file without saving Jacob Skaria Excel Programming 0 April 17th 09 02:55 PM
skipping pop up box for saving changes when closing a file Tony Excel Programming 1 October 1st 04 07:49 PM
closing a file without saving matt dunbar Excel Programming 3 November 25th 03 06:29 PM


All times are GMT +1. The time now is 05:15 AM.

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"