Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The macro is trying to change a protected cell.
In the workbook's open event reprotect with UserInterfaceonly to True. It will let macros make changes to the protected sheet. Sub Auto_Open() Whatever_Sheet.Protect UserInterFaceOnly:=True, _ Password:="whatever" End Sub "gavin" wrote in message ... Hello all, a code i use to alter the colour of a cell when double clicked, will not run when i protect the sheet?? Can someone shed some light on what im sure is a simple fix i have missed completely?? Cheers!!!!! Private Sub Worksheet_BeforeDoubleClick _ (ByVal Target As Range, Cancel As Boolean) Cancel = True If Not Intersect(Target, Range("D1:D128")) _ Is Nothing Then With Target.Interior If .ColorIndex = 3 Then .ColorIndex = xlColorIndexNone Else .ColorIndex = 3 End If End With End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
protection error | Excel Worksheet Functions | |||
Error when save as CSV with VBA password protection on | Excel Discussion (Misc queries) | |||
VBA code error with Protection turned on - help please | Excel Discussion (Misc queries) | |||
Protection error | Excel Discussion (Misc queries) | |||
Sub Error with Sheet Protection Enabled? | Excel Programming |