Excel 选中单元格后,对应的行列高亮

来自姬鸿昌的知识库
跳到导航 跳到搜索
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Cells.Interior.ColorIndex = xlNone
    Rows(Target.Row).Interior.ColorIndex = 40
    Columns(Target.Column).Interior.ColorIndex = 40
End Sub