Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Again thanks for the help, but I'm having problems and the debug program says
that the problem is with the line that reads "Cells.Interior.ColorIndex = x|none". The worksheet has some cells of different colors already, how do I change that line to keep the other cells color and only change the ranges of cells I want changed "Gary''s Student" wrote: Use an event macro: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.Interior.ColorIndex = xlNone If Intersect(Target, Range("A1")) Is Nothing Then Else Range("D1:F3").Interior.ColorIndex = 6 End If If Intersect(Target, Range("A2")) Is Nothing Then Else Range("D5:F7").Interior.ColorIndex = 6 End If End Sub This goes in Worksheet code, not a standard module. -- Gary''s Student - gsnu200715 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Get Address of Active Cell | Excel Discussion (Misc queries) | |||
value of the active cell | Excel Worksheet Functions | |||
Active Cell Color | Excel Discussion (Misc queries) | |||
HOW TO COPY 480 ACTIVE E-MAIL ADDRESSES CLM "G" ON AN ACTIVE EXCE. | Excel Discussion (Misc queries) | |||
Sum to active cell | Excel Discussion (Misc queries) |