Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following VB script which changes the color of the cell based on
its value. When the value changes, the color doesn't change at the moment. I need to double click on the cell, for the color to change. How can i make it refresh automatically? Is there a problem with the code? This is my code. Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A1:AQ120")) Is Nothing Then Select Case Target Case Is = "A" icolor = 38 Case Is = "B" icolor = 38 Case Is = "C" icolor = 35 Case Is = "D" icolor = 36 Case Is = "E" icolor = 39 Case Is = "F" icolor = 35 Case Is = "G" icolor = 37 Case Is = "H" icolor = 34 Case Is = "I" icolor = 40 Case Is = "J" icolor = 40 Case Is = "K" icolor = 34 Case Is = "L" icolor = 34 Case Is = "M" icolor = 34 Case Else 'Whatever End Select Target.Interior.ColorIndex = icolor End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy Excel functions formula and auto refresh refresh | Excel Worksheet Functions | |||
How can I auto refresh a column that has an auto filter in place | Excel Discussion (Misc queries) | |||
How can I auto-refresh auto-filters when data changes? | Excel Worksheet Functions | |||
Auto-run macro after auto-query refresh (Excel2000,sr1) | Excel Programming | |||
Auto Date Script.. | Excel Discussion (Misc queries) |