Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Great ... I'll go ahead and give that a try. Too bad, though, that the
ThisWorkbook.Saved property does not work in that case. Thanks a lot! Joe Les wrote: Sorry, in my previous post I forgot to add a check for custom properties in the worksheet change. Please substitute this, or an error will occur if the workbook is not opened in read-only mode: Private Sub Worksheet_Change(ByVal Target As Range) If ActiveSheet.CustomProperties.Count < 0 Then ActiveSheet.CustomProperties(1).Value = "True" End If End Sub -- Les Torchia-Wells "Joe HM" wrote: 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).ControlFor mat.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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
In Excel 2003 is there a way to prevent "Save As" and "Print"? | Excel Discussion (Misc queries) | |||
Disabling "SAVE AS" option under "File" | Excel Discussion (Misc queries) | |||
If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ... | Excel Programming | |||
prevent Excel from popping-up an "OK" (information) message | Excel Programming | |||
Prevent "XYZ.doc is locked for editing" message | Excel Programming |