So i want to highlight the active row across all workbooks.
here is the code for the worksheet.
I also want to code this from a macro. for example after doing workbook.add i want to add the same functionality to the new sheet / workbook
here is the code for the worksheet.
I also want to code this from a macro. for example after doing workbook.add i want to add the same functionality to the new sheet / workbook
Rich (BB code):
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
Application.ScreenUpdating = False
' Clear the color of all the cells
Cells.Interior.ColorIndex = 0
With Target
' Highlight the entire row and column that contain the active cell
.EntireRow.Interior.ColorIndex = 8
.EntireColumn.Interior.ColorIndex = 8
End With
Application.ScreenUpdating = True
End Sub
Last edited by a moderator: