标签:color val img interior span com 函数 end row
“工作表”右键,“查看代码”,
VBA代码编辑器中,选择“Worksheet”
在Worksheet_SelectionChange函数中添加如下代码:
Target.Parent.Cells.Interior.ColorIndex = xlNone Target.EntireColumn.Interior.ColorIndex = 36 Target.EntireRow.Interior.ColorIndex = 36
最后整个函数如下:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Target.Parent.Cells.Interior.ColorIndex = xlNone Target.EntireColumn.Interior.ColorIndex = 36 Target.EntireRow.Interior.ColorIndex = 36 End Sub
保存,关闭即可。
效果:
标签:color val img interior span com 函数 end row
原文地址:http://www.cnblogs.com/yczcc/p/7976620.html