excel横竖十字光标的简单介绍
- 作者: 用户投稿
- 2022年04月02日 00:00:09
PrivateSub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Cells.FormatConditions.Delete
With Target.EntireColumn
.FormatConditions.Add xlExpression, , "=true"
.FormatConditions(1).Interior.ColorIndex = 23
End With
With Target.EntireRow
.FormatConditions.Add xlExpression, , "=true"
.FormatConditions(2).Interior.ColorIndex = 27
End With
End
Sub