ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   closing file without saving (https://www.excelbanter.com/excel-programming/427091-closing-file-without-saving.html)

Novice Lee

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


Merlynsdad

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



All times are GMT +1. The time now is 03:06 PM.

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