Excel-VBA-how to highlight target row in table?
The following code works to highlight row 1 in ListObject(2) Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Cells.Count < 1 Then Exit Sub Application.ScreenUpdating = False ‘Clear the color of all cells Cells.Interior.ColorIndex = 0 Set oList = ActiveSheet.ListObjects(2) With Target ‘Highlight row and column of the selected cell .EntireColumn.Interior.ColorIndex = 24 oList.ListRows(1).Range.Interior.ColorIndex = 38 End… Read More Excel-VBA-how to highlight target row in table?