LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Close file without saving

Hi,
I'm having problems with this one. I am entering your second code in "this
workbook" after other code. The application display alerts is still showing
the "do you want to save" screen and I'm getting an error message when I put
in - this workbook. close savechanges: = false
Any ideaqs ?
Mike

"Jarek" wrote:


Hi,

Private Sub Auto_Close()
ThisWorkbook.Saved = True 'does not save the workbook, only marks it
as saved
ThisWorkbook.Close False
End Sub

or

Private Sub Auto_Close()
Application.DisplayAlerts = False 'to eliminate prompt "Do you want
to save?"
ThisWorkbook.Close SaveChanges:=False
End Sub


Jarek


--
Jarek
------------------------------------------------------------------------
Jarek's Profile: http://www.excelforum.com/member.php...nfo&userid=965
View this thread: http://www.excelforum.com/showthread...hreadid=319815


 
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
Programatically close a file without saving [email protected] Excel Programming 2 December 26th 04 01:23 AM
Close file without saving Roadie[_4_] Excel Programming 0 October 22nd 04 03:21 PM
Close file without saving Roadie[_3_] Excel Programming 1 October 22nd 04 02:53 PM
Close file without saving data ExcelMonkey[_96_] Excel Programming 2 March 2nd 04 11:34 PM


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