Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you change the default color for highlighted cells? Debra Excel Discussion (Misc queries) 1 August 13th 08 03:11 AM
How do I change the color of highlighted cells for more contrast? redhead Excel Discussion (Misc queries) 0 November 6th 07 07:57 PM
How do I count the number of cells highlighted a certain color? KSB Excel Worksheet Functions 2 October 17th 07 04:29 PM
Excel 2007, Color of highlighted cells Henrik Kofoed Excel Discussion (Misc queries) 0 April 17th 07 04:28 PM
How do I count cells that have are highlighted a certain color? NicoleE Excel Worksheet Functions 1 September 2nd 05 09:14 PM


All times are GMT +1. The time now is 11:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"