D
DTLay
OK, started with...
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel
As Boolean)
If Target.Interior.ColorIndex = 50 Then
Target.Interior.ColorIndex = xlNone
Else
Target.Interior.ColorIndex = 50
End If
Cancel = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
End Sub
Modified to...
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Target.Interior.ColorIndex = Choose(Val(Target.Value), 3, 3, 4, 4)
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
End Sub
....based on code from FSt1 and Rick Rothestein. (Thanks a ton, BTW!) Works
great, except the color doesn't change on the double click anymore. It now
changes after the cell is DC'ed, then another cell is clicked. I'm playing
with the code to try to understand why, but with little effect.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel
As Boolean)
If Target.Interior.ColorIndex = 50 Then
Target.Interior.ColorIndex = xlNone
Else
Target.Interior.ColorIndex = 50
End If
Cancel = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
End Sub
Modified to...
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Target.Interior.ColorIndex = Choose(Val(Target.Value), 3, 3, 4, 4)
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
End Sub
....based on code from FSt1 and Rick Rothestein. (Thanks a ton, BTW!) Works
great, except the color doesn't change on the double click anymore. It now
changes after the cell is DC'ed, then another cell is clicked. I'm playing
with the code to try to understand why, but with little effect.