Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Changing the color of highlighted cells
Is it possible to change the color of the cells when a range is selected with
the mouse pointer? Not simply changing the color of a range of cells, but changing the highlighted ones only? It seems like it should be a simple default option change, gridline color can be changed, so I would think the highlighting color would be able to also? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Changing the color of highlighted cells
Only though VBA and with some possibly unwanted results.
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Static OldCell As Range If Application.CutCopyMode = 0 Then If Not OldCell Is Nothing Then OldCell.Interior.ColorIndex = xlColorIndexNone OldCell.Borders.LineStyle = xlLineStyleNone End If Set OldCell = Target OldCell.Interior.ColorIndex = 6 OldCell.Borders.LineStyle = xlContinuous Else If OldCell Is Nothing Then Set OldCell = Target Else Set OldCell = Union(OldCell, Target) End If End If End Sub Will color the selected cell(s) yellow. Note: will wipe out existing background color of cells cell unless BG color is due to CF Gord Dibben MS Excel MVP On Mon, 2 Mar 2009 13:05:01 -0800, krish wrote: Is it possible to change the color of the cells when a range is selected with the mouse pointer? Not simply changing the color of a range of cells, but changing the highlighted ones only? It seems like it should be a simple default option change, gridline color can be changed, so I would think the highlighting color would be able to also? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do you change the default color for highlighted cells? | Excel Discussion (Misc queries) | |||
How do I change the color of highlighted cells for more contrast? | Excel Discussion (Misc queries) | |||
How do I count the number of cells highlighted a certain color? | Excel Worksheet Functions | |||
Excel 2007, Color of highlighted cells | Excel Discussion (Misc queries) | |||
How do I count cells that have are highlighted a certain color? | Excel Worksheet Functions |