I have some buttons in my worksheet.And all those buttons will do the same action. Since I will also dynamically create even more buttons using VBA during runtime, is there any way to create the actions for them without typing for example "Private Sub Line15_Click() SendData (15)" manually? I mean I want to add the action to the button at the same time the button is created.
Thank you~~~
The example of the current button action is as below.
Yours sincerely,
lolo
Thank you~~~
The example of the current button action is as below.
Code:
Private Sub Line15_Click()
SendData (15)
End Sub
Private Sub Line16_Click()
SendData (16)
End Sub
Private Sub Line17_Click()
SendData (17)
End Sub
Private Sub Line18_Click()
SendData (18)
Yours sincerely,
lolo
Last edited: