发布网友
共1个回答
热心网友
'按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