Thread: ColorIndex
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Trevor Davidson Trevor Davidson is offline
external usenet poster
 
Posts: 1
Default ColorIndex

The Code below works just fine when the Worksheet is
unprotected.
The problem starts when I protect the worksheet. All
cells in the code are unprotected.
I get an error 1004.

Please Help

Sub Worksheet_SelectionChange(ByVal target As Range)
If Range("C23") < 8 Then
Range("C8:C22").Interior.ColorIndex = 6
Else
Range("C8:C22").Interior.ColorIndex = 44
End If
End Sub