J
Joe HM
Hello -
I posted this question before but I have narrowed down what the problem
is.
I have a workbook with a button that I want to disable when it is
opened in read-only (just to prevent people from pressing it). So I
use
If ThisWorkbook.ReadOnly Then
ThisWorkbook.Sheets("Sheet1").Shapes(1).ControlFormat.Enabled =
False
The problem is that this somehow triggers Excel to detect a change and
as whether to save the workbook upon closing.
I used ThisWorkbook.Saved = True after this but it did not make a
difference. I even used the Application.EnableEvents = False/True
around it.
Any ideas?
Thanks,
Joe
I posted this question before but I have narrowed down what the problem
is.
I have a workbook with a button that I want to disable when it is
opened in read-only (just to prevent people from pressing it). So I
use
If ThisWorkbook.ReadOnly Then
ThisWorkbook.Sheets("Sheet1").Shapes(1).ControlFormat.Enabled =
False
The problem is that this somehow triggers Excel to detect a change and
as whether to save the workbook upon closing.
I used ThisWorkbook.Saved = True after this but it did not make a
difference. I even used the Application.EnableEvents = False/True
around it.
Any ideas?
Thanks,
Joe