hello
my selection change event changes the active cell to bold text that returns to normal text when clicked away.
the same should happen for going from no borders to thick yellow borders:
they appear, but after the next click they stay on the previous cell...
what is my mistake ?
have a great sunday !!!
Code
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static PrevCell As Range
If Not PrevCell Is Nothing Then
PrevCell.Font.Bold = False
Target.Borders.LineStyle = Excel.XlLineStyle.xlLineStyleNone
End If
Target.Font.Bold = True
PrevCell.BorderAround ColorIndex:=5, Weight:=xlThick
Set PrevCell = Target
Display More