美文网首页
office excel 选择单元格时一行变色

office excel 选择单元格时一行变色

作者: 细雨么么 | 来源:发表于2021-06-09 17:52 被阅读0次
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
On Error Resume Next
Cells.FormatConditions.Delete
With Target.EntireRow.FormatConditions
.Delete
.Add xlExpression, , "TRUE"
.Item(1).Interior.ColorIndex = 6
End With
End Sub

ColorIndex=6 可以改颜色。
设置方式:右键表格名字-查看代码-贴入代码 。就可以了。
【阅读视图 只有WPS才有,亏我百度一圈在office 里面找了好久。丢~~~~】

相关文章

网友评论

      本文标题:office excel 选择单元格时一行变色

      本文链接:https://www.haomeiwen.com/subject/oyvzsltx.html