![]() |
ThisWorkbook.Saved = True does not work when Shapes().ControlFormat.Enabled = False
Hello -
I am trying to figure out why I cannot set the ThisWorkbook.Saved values to True to avoid being prompted whether I want to save the workbook upon exiting. The code is doing the following ... Workbook_Open() Application.OnTime Now, "preProcess" ... Public Sub preProcess() If ThisWorkbook.ReadOnly Then ThisWorkbook.Sheets("Sheet1").Shapes("Button1").Co ntrolFormat.Enabled = False ThisWorkbook.Saved = True End If ... If I open the file in read-only and close it without making any changes, I get the "Do you want to save changes ..." message. All I want to do is to disable the button when the file is read-only. How can I tell Excel that it should not care whether the button has changed? I use Excel 11 (2003) SP2. Thanks! Joe |
All times are GMT +1. The time now is 01:21 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com