Hi everyone,
Thanks for taking the time to look at my issue.
I have found some code to highlight the active selected cell. I've add a bit to change the font colour to be easier read. My issue is, how do I change it back to black when I select a different cell?
Also, if at all possible, I have some cells that are already in bold and if I select that cell and move to another, the bold formatting is removed. How do I fix that?
Thanks again for taking a look.
Thanks for taking the time to look at my issue.
I have found some code to highlight the active selected cell. I've add a bit to change the font colour to be easier read. My issue is, how do I change it back to black when I select a different cell?
Code:
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Static strPrevAddress As String
If Not strPrevAddress = vbNullString Then
With Range(strPrevAddress)
.Interior.ColorIndex = xlNone
.Font.Bold = False
End With
End If
With Target
.Interior.ColorIndex = 23
.Font.Bold = True
.Font.ColorIndex = 2
End With
strPrevAddress = Target.Address
End Sub
Also, if at all possible, I have some cells that are already in bold and if I select that cell and move to another, the bold formatting is removed. How do I fix that?
Thanks again for taking a look.