I have cell K8 with color fill yellow and I'm using the code below so that it became a no fill cell when double click on it. I think that I have something wrong in the code since its not functioning.
Thanks
Thanks
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("K8")) Is Nothing Then
If Target.Count > 1 Then Exit Sub
If Target.Value = "" Then
Target.Interior.ColorIndex = 6
Else
Target.Interior.ColorIndex = xlNone
End If
End If
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("K8")) Is Nothing Then
If Target.Count > 1 Then Exit Sub
If Target.Value = "" Then
Target.Interior.ColorIndex = 6
Else
Target.Interior.ColorIndex = xlNone
End If
End If
End Sub
Last edited: