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

I have a routine where I open a file and make temporary changes to it.
When I close it, I do not want to be prompted to save changes. I d
not want to save the changes. They code I am using looks like this:

Windows(FilenameVar &".xls").Activate
ActiveWindow.Close

How to code it so that I am not prompted for saving?

Thanks

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Close file without saving data

Hi
try

Windows(FilenameVar &".xls").Activate
Application.DisplayAlerts = False
ActiveWindow.Close
Application.DisplayAlerts = True

you could also use

Application.DisplayAlerts = False
Workbooks(FilenameVar &".xls").close
Application.DisplayAlerts = True

--
Regards
Frank Kabel
Frankfurt, Germany

I have a routine where I open a file and make temporary changes to

it.
When I close it, I do not want to be prompted to save changes. I do
not want to save the changes. They code I am using looks like this:

Windows(FilenameVar &".xls").Activate
ActiveWindow.Close

How to code it so that I am not prompted for saving?

Thanks.


---
Message posted from http://www.ExcelForum.com/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Close file without saving data

Workbooks(FilenameVar &".xls").Close False

--

Vasant

"ExcelMonkey " wrote in message
...
I have a routine where I open a file and make temporary changes to it.
When I close it, I do not want to be prompted to save changes. I do
not want to save the changes. They code I am using looks like this:

Windows(FilenameVar &".xls").Activate
ActiveWindow.Close

How to code it so that I am not prompted for saving?

Thanks.


---
Message posted from http://www.ExcelForum.com/



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
If I close a file without saving changes, can I get the autosaved jimp Excel Discussion (Misc queries) 0 July 31st 09 01:20 AM
File/Close automatically saving changes without prompt Joe@SAA Excel Discussion (Misc queries) 0 June 23rd 08 10:31 PM
close w/o saving jatman Excel Worksheet Functions 5 February 29th 08 02:52 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
Excel 2003: File->Close without saving changes (save menu does no. Wai-Yee Excel Discussion (Misc queries) 5 July 25th 05 11:49 PM


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