LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Macro to close without saving

Hi,

I have tried both suggested macro codes and neither of them work.

When I go back into view the code I get the following error message??

'Object Library invalid or contains references to object definitions that
could not be found'

I don't think this has caused it but I have never had this before - VB help
is of no help at all!
--
Leanne M (Aussie)
(Changed Display name from Leanne)
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)


"Gary''s Student" wrote:

Sub close_out()
ActiveWorkbook.Saved = True
ActiveWorkbook.Close
End Sub

--
Gary''s Student - gsnu200782


"Leanne M (Aussie)" wrote:

Hi,

I have a file which is to be viewed only.

I have got the code to close the workbook but I want to include the fact
that it should be closed without saving changes.

Is this possible?

My code for closing is simply

ActiveWorkbook.Close

Thanks


--
Leanne M (Aussie)
(Changed Display name from Leanne)
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)

 
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
close w/o saving jatman Excel Worksheet Functions 5 February 29th 08 02:52 PM
Macro to Prompt User to Close After Saving Rutabaga Excel Discussion (Misc queries) 2 July 12th 07 12:38 AM
Close without saving Brian Matlack[_54_] Excel Programming 5 February 8th 06 07:31 PM
How can I get an excel macro to close without saving ! Roger O Excel Programming 4 September 21st 05 04:21 PM
Close without Saving In VBA Celtic_Avenger[_14_] Excel Programming 3 September 11th 04 11:04 PM


All times are GMT +1. The time now is 05:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"