VBA Code for Highlight Active Row and Column

Опубликовано: 17 Апрель 2026
на канале: Aziz360
315
10

Code for you------------------

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Cells.Interior.ColorIndex = xlNone
Dim a As Integer
Dim B As Integer
a = ActiveCell.Row
B = ActiveCell.Column
ActiveSheet.Rows(a).Interior.ColorIndex = 4
ActiveSheet.Columns(B).Interior.ColorIndex = 9
ActiveSheet.Cells(a, B).Select
End Sub