amadeuslee

image

 

方法:

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

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值列表:

分类:

技术点:

相关文章:

  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
  • 2022-02-07
  • 2021-06-23
相关资源
相似解决方案