Change highlight cell color

G

Guest

anyone know how to change the way that the current cell is highlighted?

Currently a white border is displayed around the cell. However, I am trying
to find an alternative way of highlighting the cell for a partially sighted
colleague. A different color for the current cell would be good, or a big
thick border in a contrasting color would do.

Any ideas?
 
D

Don Guillett

'McCurdy.Here is something inspired by Don Guillett.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim MyRng As Range
Set MyRng = Target '.EntireRow
Application.EnableEvents = False
On Error GoTo end1
Application.Cells.FormatConditions.Delete
With MyRng
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=ROW()=ROW(INDIRECT(CELL(""address"")))"
With .FormatConditions(1).Font
.Bold = True
.Italic = False
.ColorIndex = 1
End With
.FormatConditions(1).Interior.ColorIndex = 36
End With
end1:
Application.EnableEvents = True
End Sub
 
G

Guest

Don

This is really useful. Tried it and liked it. But.....
is there any way to make the highlighted text even larger?

The standard font size on the spreadsheet is 11pt. So I tried adding ".Size
= 16" to your macro, but nothing seems to happen
 
D

Don Guillett

try this mod

'McCurdy.Here is something inspired by Don Guillett.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim MyRng As Range
Set MyRng = Target '.EntireRow
Application.EnableEvents = False
On Error GoTo end1
Application.Cells.FormatConditions.Delete
Application.Cells.Font.Size = 10
With MyRng
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=ROW()=ROW(INDIRECT(CELL(""address"")))"
With .FormatConditions(1).Font
.Bold = True
.Italic = False
.ColorIndex = 1
End With
.Font.Size = 20
.FormatConditions(1).Interior.ColorIndex = 36
End With
end1:
Application.EnableEvents = True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top