so my code below works for changing activex control command buttons from red to green depending on the value in J1 however J1 value changes.
Now I would like my code to update depending on if J1 have changed. is there a way i can force this to run again after the cell J1 has changed?
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, [J1]) Is Nothing Then
For Each obj In ActiveSheet.OLEObjects
If obj.Name = "CommandButton8" Then
With obj
If [J1].Value >= 1 Then .Object.BackColor = RGB(0, 255, 0)
If [J1].Value = 0 Then .Object.BackColor = RGB(255, 0, 0)
End With
End If
Next
End If
On Error GoTo 0
End Sub
Thank you so much!