Excel表格如何使用row函数和column函数和match函数来实现聚光灯效果...
发布网友
发布时间:2024-01-06 15:44
我来回答
共1个回答
热心网友
时间:2024-03-11 08:25
'按ALT+F11-插入模块-粘贴代码-将表格另存为启用宏的格式
Private Sub Workbook_sheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
'Dim i As Range
Cells.Interior.ColorIndex = 0
'Set i = Application.Union(Target.EntireColumn, Target.EntireRow) '整行整列
Target.EntireRow.Interior.ColorIndex = 43 '整行
'Target.Cells.Interior.ColorIndex = 43'选择单元格
End Sub