高亮顯示選取行和列的代碼,把下面的代碼放在工作表代碼窗口中
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