Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Yesterday | Excel Worksheet Functions | |||
I really need help. Need a formula. Need it yesterday. | New Users to Excel | |||
continuation from yesterday | Excel Discussion (Misc queries) | |||
Sub From Yesterday | Excel Programming |