Last active
December 13, 2021 16:02
-
-
Save juwbr/f3b575b0de8baa245944f753c2c5b763 to your computer and use it in GitHub Desktop.
Excel highlight active row
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' 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) | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment