ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Cell selection highlight colour (https://www.excelbanter.com/excel-worksheet-functions/181509-cell-selection-highlight-colour.html)

Avril S

Cell selection highlight colour
 
Does anybody know if it is possible to change the colour and or contrast of
the cell selection highlight colour. This is where you wish to highlight
cells but not change thier colours in the spreadsheet. The highlight colour
contrast I am seeing on screen is too light. It makes no difference if I
change the vdu contrast and brightness settings.

Bob Phillips

Cell selection highlight colour
 
One way, but it does wipe out all CF


'----------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'----------------------------------------------------------------
Cells.FormatConditions.Delete
With Target
With .EntireRow
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
With .FormatConditions(1)
With .Borders(xlTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
With .Borders(xlBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
.Interior.ColorIndex = 20
End With
End With
With .EntireColumn
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
With .FormatConditions(1)
With .Borders(xlLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
With .Borders(xlRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
.Interior.ColorIndex = 20
End With
End With

.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 36
End With

End Sub


'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.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Avril S" wrote in message
...
Does anybody know if it is possible to change the colour and or contrast
of
the cell selection highlight colour. This is where you wish to highlight
cells but not change thier colours in the spreadsheet. The highlight
colour
contrast I am seeing on screen is too light. It makes no difference if I
change the vdu contrast and brightness settings.




Mike H

Cell selection highlight colour
 
Hi,

You could use this addin

http://www.cpearson.com/excel/RowLiner.htm

Mike

"Avril S" wrote:

Does anybody know if it is possible to change the colour and or contrast of
the cell selection highlight colour. This is where you wish to highlight
cells but not change thier colours in the spreadsheet. The highlight colour
contrast I am seeing on screen is too light. It makes no difference if I
change the vdu contrast and brightness settings.


Gord Dibben

Cell selection highlight colour
 
Whereas Chip Pearson's customizable Rowliner add-in does not wipe out CF or
existing color formats.

http://www.cpearson.com/excel/RowLiner.htm


Gord Dibben MS Excel MVP

On Thu, 27 Mar 2008 12:14:53 -0000, "Bob Phillips"
wrote:

One way, but it does wipe out all CF


'----------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'----------------------------------------------------------------
Cells.FormatConditions.Delete
With Target
With .EntireRow
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
With .FormatConditions(1)
With .Borders(xlTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
With .Borders(xlBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
.Interior.ColorIndex = 20
End With
End With
With .EntireColumn
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
With .FormatConditions(1)
With .Borders(xlLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
With .Borders(xlRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
.Interior.ColorIndex = 20
End With
End With

.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 36
End With

End Sub


'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.



AS

Cell selection highlight colour
 
Thanks guys - will try this out and see if it provides the solution. Shame
there is nothing in the standard functionlaity, as this was not an issue in
the 2003 version.
--
Avril S


"Gord Dibben" wrote:

Whereas Chip Pearson's customizable Rowliner add-in does not wipe out CF or
existing color formats.

http://www.cpearson.com/excel/RowLiner.htm


Gord Dibben MS Excel MVP

On Thu, 27 Mar 2008 12:14:53 -0000, "Bob Phillips"
wrote:

One way, but it does wipe out all CF


'----------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'----------------------------------------------------------------
Cells.FormatConditions.Delete
With Target
With .EntireRow
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
With .FormatConditions(1)
With .Borders(xlTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
With .Borders(xlBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
.Interior.ColorIndex = 20
End With
End With
With .EntireColumn
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
With .FormatConditions(1)
With .Borders(xlLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
With .Borders(xlRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
.Interior.ColorIndex = 20
End With
End With

.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 36
End With

End Sub


'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.





All times are GMT +1. The time now is 02:51 AM.

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