Hey guys,
Need help here to fix my code.. My objective to double click on cell and cell color will change to GREEN and insert RECEIVED text.
The problem is, I need to fix my code so make make it work with colored cell also instead WHITE cell only
EDIT: Colored cell come from conditional formatting. (Maybe this is culprit??)
Vy0ytIO.png
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Me.Range("D2:O100")) Is Nothing Then
Cancel = True
Application.EnableEvents = False
If Target.Interior.Pattern = xlNone Then '<-------- PROBLEM HERE
Target.Interior.ColorIndex = 4 'green
Target.Value2 = "RECEIVED"
Else
Target.Interior.Pattern = xlNone
Target.Value = ""
End If
End If
FallThrough:
Application.EnableEvents = True
End Sub
Bookmarks