Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Closing temp worksheet without saving

Hope somebody is able to help.

I have created an macro where I am opening and using an workbook, and
then closing it again without saving it. The problem is that I cannot
close the workbook without having to clik save-yes or save-no. I do
still need to have som other excel sheets open.

I have tried to use the following code:
ActiveWorkbook.Close = False
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Closing temp worksheet without saving

ActiveWorkbook.Close savechanges:=false
or
ActiveWorkbook.Close False



JanB wrote:

Hope somebody is able to help.

I have created an macro where I am opening and using an workbook, and
then closing it again without saving it. The problem is that I cannot
close the workbook without having to clik save-yes or save-no. I do
still need to have som other excel sheets open.

I have tried to use the following code:
ActiveWorkbook.Close = False


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Closing temp worksheet without saving

This article could be of use to you:-

http://exceltips.vitalnews.com/Pages...t_Changes.html

Hope it helps.
Mat

On Jan 25, 2:38 pm, JanB wrote:
Hope somebody is able to help.

I have created an macro where I am opening and using an workbook, and
then closing it again without saving it. The problem is that I cannot
close the workbook without having to clik save-yes or save-no. I do
still need to have som other excel sheets open.

I have tried to use the following code:
ActiveWorkbook.Close = False


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Closing temp worksheet without saving

Try

ActiveWorkbook.Close savechanges:=False

Mike

"JanB" wrote:

Hope somebody is able to help.

I have created an macro where I am opening and using an workbook, and
then closing it again without saving it. The problem is that I cannot
close the workbook without having to clik save-yes or save-no. I do
still need to have som other excel sheets open.

I have tried to use the following code:
ActiveWorkbook.Close = False

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Closing temp worksheet without saving

Thanks. Problem solved.
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
excel creates multiple temp files when saving westbrom Excel Discussion (Misc queries) 7 September 25th 13 04:09 PM
Problem using obj.Namespace(sourceFileName) Namespace(DestinationFilename).Itemsand then opening the xls file which creates a Temp Folder inside Temp Yuvraj Excel Discussion (Misc queries) 3 May 3rd 09 11:59 AM
Excel Saving to Temp File for files on network samdev Excel Discussion (Misc queries) 2 September 2nd 06 01:43 PM
Why is Word, Excel saving a backup copy in my temp directory? daddyribs Excel Discussion (Misc queries) 1 April 19th 06 04:24 PM
Worksheet has to set to visible as it is not visible after saving and closing Excel by VB. Oscar Excel Programming 6 June 21st 05 10:39 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"