Private Sub Worksheet_Change(
ByVal Target
As Range)
If Target.Address =
"$B$1" And [A1].Value > [B1].Value
Then
Target.Interior.ColorIndex =
3
Else
Target.Interior.ColorIndex =
xlNone
End If
End Sub
转自EXCELHOME论坛,很实用的事件触发器,在此记下备忘。
转载于:https://www.cnblogs.com/luoye00/p/10863572.html
相关资源:多个按钮共用一个事件(VBA)