ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can you change the color of the selected range? (https://www.excelbanter.com/excel-discussion-misc-queries/33278-how-can-you-change-color-selected-range.html)

Andrew

How can you change the color of the selected range?
 
How do you change the default colour that excel applies to a selected range
of cells? I do not want to permenantly highlight them (fill them) but I do
want the selected range to be more obvious?

Bob Phillips

Very odd request?

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlColorIndexNone
Target.Interior.ColorIndex = 3
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Andrew" wrote in message
...
How do you change the default colour that excel applies to a selected

range
of cells? I do not want to permenantly highlight them (fill them) but I do
want the selected range to be more obvious?




Dave Peterson

You may want to try Chip Pearson's utility:
http://www.cpearson.com/excel/RowLiner.htm

Be aware that with this (and most macros), you lose the ability to do Edit|Undo.

Andrew wrote:

How do you change the default colour that excel applies to a selected range
of cells? I do not want to permenantly highlight them (fill them) but I do
want the selected range to be more obvious?


--

Dave Peterson


All times are GMT +1. The time now is 05:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com