View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Macro to close without saving

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!)