鼠标选中的地方EXCEL表格自动变颜色,如保更改颜色
我想在EXCEL中鼠标选中的地方变成红色
需要编写vba程序 Private Sub Worksheet_SelectionChange(ByVal Target As Excel。Range) On Error Resume Next Cells。FormatConditions。
Delete iColor = Int(50 * Rnd() + 2) With Target。EntireRow。FormatConditions 。Delete 。Add xlExpression, , "TRUE" 。
Item(1)。Interior。ColorIndex = iColor End With With Target。EntireColumn。FormatConditions 。Delete 。
Add xlExpression, , "TRUE" 。Item(1)。Interior。ColorIndex = iColor End With End Sub 。
答:Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.Interior.Colo...详情>>