高亮显示选取行和列的代码,把下面的代码放在工作表代码窗口中
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Application.ScreenUpdating = False
Cells.Interior.ColorIndex = -4142
Rows(Target.Row).Interior.ColorIndex = 20
Columns(Target.Column).Interior.ColorIndex = 20
Application.ScreenUpdating = True
End Sub