View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Disable option save when close excel

Just a thought for the OP if looking for a reliable method, if Macros are
disabled, then this will not work.

You might make the workbook ReadOnly (although this can be defeated as
well).

--
Regards,
Tom Ogilvy


"davesexcel" wrote
in message ...

Exit without saving
Posted by Mark O'Brien on September 27, 2001 11:53 AM

Insert this code onto the workbook object
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Me.Saved = False Then Me.Saved = True
End Sub

that should work.


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile:

http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=522415