Excel聚光灯设置

1.同时按住 ALT+F11进入vba

2.双击要设置的sheet页

 

3.输入以下代码

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Cells.Interior.ColorIndex = xlNone

Target.EntireRow.Interior.ColorIndex = 24

Target.EntireColumn.Interior.ColorIndex = 24

End Sub

 

4.效果如下

注:该操作会去除所有的颜色填充

 

posted @ 2022-08-29 13:59  四毛二  阅读(456)  评论(0编辑  收藏  举报