J
JCook423
Hello, I came across this,
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Address(False, False) = "A1" Then
If IsNumeric(.Value) Then
Application.EnableEvents = False
Range("B1").Value = Range("B1").Value + .Value
Application.EnableEvents = True
End If
End If
End With
End Sub
which works fine by dropping it into the sheet coding. However what I’m
trying to do is alter this code so I can “Assign Macro…†it to a
button/object/autoshape that I can click to trigger the event instead of the
event trigger automatically as it does now.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Address(False, False) = "A1" Then
If IsNumeric(.Value) Then
Application.EnableEvents = False
Range("B1").Value = Range("B1").Value + .Value
Application.EnableEvents = True
End If
End If
End With
End Sub
which works fine by dropping it into the sheet coding. However what I’m
trying to do is alter this code so I can “Assign Macro…†it to a
button/object/autoshape that I can click to trigger the event instead of the
event trigger automatically as it does now.