试一试以下的 vba:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)Dim iColor As Integer
On Error Resume
NextiColor = Target.Interior.ColorIndex
If iColor <0
Then
iColor = 6 [可更改-> 0 至55]
Else
iColor = iColor + 2 [可变动]
End If
If iColor = Target.Font.ColorIndex Then iColor = iColor + 1
Cells.FormatConditions.Delete
With Range("A" &Target.Row, Target.Address) 'Rows(Target.Row)
.FormatConditions.Add Type:=2, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = iColor
.FormatConditions(1).Font.Bold = TrueEnd With
With Range(Target.Offset(1 - Target.Row, 0).Address & ":" & _
Target.Offset(-1, 0).Address) 'Rows(Target.Row)
.FormatConditions.Add Type:=2, Formula1:="FALSE"
.FormatConditions(1).Interior.ColorIndex = 0
End With
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)Dim iColor As Integer
On Error Resume
NextiColor = Target.Interior.ColorIndex
If iColor <0
Then
iColor = 6 [可更改-> 0 至55]
Else
iColor = iColor + 2 [可变动]
End If
If iColor = Target.Font.ColorIndex Then iColor = iColor + 1
Cells.FormatConditions.Delete
With Range("A" &Target.Row, Target.Address) 'Rows(Target.Row)
.FormatConditions.Add Type:=2, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = iColor
.FormatConditions(1).Font.Bold = TrueEnd With
With Range(Target.Offset(1 - Target.Row, 0).Address & ":" & _
Target.Offset(-1, 0).Address) 'Rows(Target.Row)
.FormatConditions.Add Type:=2, Formula1:="FALSE"
.FormatConditions(1).Interior.ColorIndex = 0
End With
End Sub
2 comments:
viagra alternatives viagra for sale without a prescription effect of viagra on women generic viagra india bad side effects of viagra viagra uk cost pill viagra england generic soft tab viagra cheapest viagra in uk viagra jelly buy cheap viagra soft generic name of viagra cheap viagra tablets viagra rrp australia
Not something like anti virus or media player, but something like desktop clock, desktop effects, etc. [url=http://gordoarsnaui.com]santoramaa[/url]
Post a Comment