Add a Click event for a control
- Open the Script Editor.
How?
- For the control to which you want to add a Click event, add the following, where CommandButton1 is the name of the control.
Sub CommandButton1_Click
End Sub
- Enter the code that you want in the event.