Further to my post yesterday, I need to have a commandbutton change its color when the content of a cell changes in another worksheet from blank("") to a value
Had the following suggestion from a board member(thanks!)
Private Sub Worksheet_Change(ByVal Target As Range)
Const sAdd As String = "A1" '<<==== CHANGE
If Not Intersect(Range(sAdd), Target) Is Nothing Then
With Me.CommandButton1
If IsEmpty(Target) Then
.BackColor = &HFFFF&
Else
.BackColor = &HFF&
End If
End With
End If
End Sub
This works if I manually enter a value or "" into say"A1" on the sheet, but not if the value changes in "A1" as a result of a formula - any ideas welcome!
Also, what do I need to add to the code to say refer to "A1" in another worksheet??
Cheers
Peter
Bookmarks