博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【Vegas原创】EXCEL光标所在的行自动变色
阅读量:7028 次
发布时间:2019-06-28

本文共 383 字,大约阅读时间需要 1 分钟。

 

方法:

1,excel中,按Alt+F11,打开VBA编辑界面,双击需要改的工作表名称,将下面代码粘贴到右边框中,即可。

2,代码:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Cells.Interior.ColorIndex = 0
Rows(Target.Row).Interior.ColorIndex = 34
End Sub

 

3,如果想变颜色,改这句代码的值:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Cells.Interior.ColorIndex = 0
Rows(Target.Row).Interior.ColorIndex = 34
End Sub

 

4,ColorIndex值列表:

538ab76c4c8f108b46ec5&690

转载地址:http://enrxl.baihongyu.com/

你可能感兴趣的文章