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


I am trying to close a spreadsheet without saving any changes to it from
within a macro, but at the moment it keeps asking me do I want to save
changes.

The code so far is

Windows("control of contract - item 1.xls").Activate
ActiveWorkbook.Close

Can someone help.

I don't want to save before closing which would get rid of the message
because it takes about 10 seconds to close.

Thanks for any replies
Okanem


--
okanem
------------------------------------------------------------------------
okanem's Profile: http://www.excelforum.com/member.php...fo&userid=9301
View this thread: http://www.excelforum.com/showthread...hreadid=320054

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default closing without saving within a macro

Hi
use
application.displayalerts=false
ActiveWorkbook.Close


--
Regards
Frank Kabel
Frankfurt, Germany

"okanem" schrieb im Newsbeitrag
...

I am trying to close a spreadsheet without saving any changes to it

from
within a macro, but at the moment it keeps asking me do I want to

save
changes.

The code so far is

Windows("control of contract - item 1.xls").Activate
ActiveWorkbook.Close

Can someone help.

I don't want to save before closing which would get rid of the

message
because it takes about 10 seconds to close.

Thanks for any replies
Okanem


--
okanem
---------------------------------------------------------------------

---
okanem's Profile:

http://www.excelforum.com/member.php...fo&userid=9301
View this thread:

http://www.excelforum.com/showthread...hreadid=320054


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default closing without saving within a macro

Or

ActiveWorkbook.Close False

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Frank Kabel" wrote in message ...
Hi
use
application.displayalerts=false
ActiveWorkbook.Close


--
Regards
Frank Kabel
Frankfurt, Germany

"okanem" schrieb im Newsbeitrag
...

I am trying to close a spreadsheet without saving any changes to it

from
within a macro, but at the moment it keeps asking me do I want to

save
changes.

The code so far is

Windows("control of contract - item 1.xls").Activate
ActiveWorkbook.Close

Can someone help.

I don't want to save before closing which would get rid of the

message
because it takes about 10 seconds to close.

Thanks for any replies
Okanem


--
okanem
---------------------------------------------------------------------

---
okanem's Profile:

http://www.excelforum.com/member.php...fo&userid=9301
View this thread:

http://www.excelforum.com/showthread...hreadid=320054




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
Saving and Closing erf Excel Discussion (Misc queries) 1 June 18th 08 08:38 AM
How to code on Macro on saving and closing a file? Eric Excel Worksheet Functions 1 June 10th 07 01:32 PM
macro help - closing without saving & empty clipboard Bry Excel Discussion (Misc queries) 3 November 23rd 06 02:45 PM
closing & saving rufusf Excel Worksheet Functions 2 March 5th 06 09:37 AM
VBA - closing without saving changes ajliaks[_14_] Excel Programming 2 April 21st 04 09:28 PM


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