View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
gavin gavin is offline
external usenet poster
 
Posts: 2
Default Error with protection

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 = Tru
If Not Intersect(Target, Range("D1:D128"))
Is Nothing The
With Target.Interio
If .ColorIndex = 3 The
.ColorIndex = xlColorIndexNon
Els
.ColorIndex =
End I
End Wit
End I
End Sub