|
Private Sub Worksheet_SelectionChange(ByVal Target As Range) '半截聚光灯
Application.ScreenUpdating = False
Cells.Interior.ColorIndex = xlNone
c = Target.Column
r = Target.row
Union(Range(Cells(r, 1), Target), Range(Cells(1, c), Target)).Interior.ColorIndex = 6
Application.ScreenUpdating = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
If Target.Row > 1 And Target.Column < 6 Then
[A2:E65536].Interior.ColorIndex = xlNone '去除背景色
Selection.Interior.ColorIndex = 4 '绿色
End If
Application.EnableEvents = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.FormatConditions.Delete
m = Int((Rnd * 56) + 1)
iColor = m
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
分享一下,来自网上 |
评分
-
1
查看全部评分
-
|