Skip to content

Instantly share code, notes, and snippets.

View juwbr's full-sized avatar

Julian Weber juwbr

View GitHub Profile
@juwbr
juwbr / HighlightRow.vba
Last active December 13, 2021 16:02
Excel highlight active row
' needs to be added into the worksheet "module" and not in a separate module
Public LastCell
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If (Not (LastCell = "")) Then
Range(LastCell).EntireRow.Interior.Color = RGB(58, 56, 56)
End If
LastCell = ActiveCell.Address
ActiveCell.EntireRow.Interior.Color = RGB(38, 38, 38)