Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable option save when close excel
Hi,
I'm making a macro that open an excel document only for consulting. So, if anybody makes changes in it, the changes can not be saved. For that, when the document is closed, I need inhibit the window asking if we want save it. If anybody knows how make it, I'm very pleasure. Thamks in advance. Rui Álvares |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable option save when close excel
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007: How do I disable the 'Do you wish to save changes to...' when I close an un changed file? | Excel Discussion (Misc queries) | |||
Save-As Option Disable | Excel Worksheet Functions | |||
Disable "save" option on close. | Excel Discussion (Misc queries) | |||
Option in Excel to save a close a workbook inactive for 5 minutes | Excel Discussion (Misc queries) | |||
Disable "Save As" Option | Excel Discussion (Misc queries) |