Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection highlight color
hi,
When cells are selected a blue color transparent color appears in the selection. Is it possible to change the color programatically? bye Abhilash |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection highlight color
Hi Abhilash,
news.microsoft.com wrote: When cells are selected a blue color transparent color appears in the selection. Is it possible to change the color programatically? You could do this by placing code similar to the following in the ThisWorkbook module: Private rngOld As Range Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _ ByVal Target As Range) If Not rngOld Is Nothing Then rngOld.Interior.ColorIndex = 0 Set rngOld = Selection rngOld.Interior.Color = RGB(255, 0, 0) ActiveCell.Interior.ColorIndex = 0 End Sub As written, this will "overwrite" any fill colors your cells had prior to being selected. You could use a static array to track the colors, then set them back to the originals instead of setting colorindex=0 if you want. -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection highlight color
Hello,
Well i dont want to change the fill colours of the cell. Thanks for your response... Any other approach available? Regards, Abhilash "Jake Marx" wrote in message ... Hi Abhilash, news.microsoft.com wrote: When cells are selected a blue color transparent color appears in the selection. Is it possible to change the color programatically? You could do this by placing code similar to the following in the ThisWorkbook module: Private rngOld As Range Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _ ByVal Target As Range) If Not rngOld Is Nothing Then rngOld.Interior.ColorIndex = 0 Set rngOld = Selection rngOld.Interior.Color = RGB(255, 0, 0) ActiveCell.Interior.ColorIndex = 0 End Sub As written, this will "overwrite" any fill colors your cells had prior to being selected. You could use a static array to track the colors, then set them back to the originals instead of setting colorindex=0 if you want. -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I darken the cell selection highlight color | Excel Discussion (Misc queries) | |||
Cell selection highlight colour | Excel Worksheet Functions | |||
Cell Selection Highlight | Excel Discussion (Misc queries) | |||
Highlight a selection from a menu, urgent! | Excel Programming | |||
Highlight the selection! | Excel Programming |