Hey,
I've got the code creating buttons dynamically which I want to assign action to. The action gonna be the same for each created button on userform.
I would be appreciate for any ideas how to do it.
Here is example part of my code generating given amount of buttons with caption (+):
For i = 1 To numberGivenByUser
With Frame1.Controls.Add("Forms.CommandButton.1", "addExecutor" & i, True)
.Caption = "+"
.Height = 20
.Width = 20
.Left = 300
.Top = (12 * i)
End With
Next
And now for each created CommandButton I'd like to assign same action.
And if possible I don't want to create many command buttons on userform in hidden mode just want to assign action dynamically during runtime to exact number of generated buttons.
Bookmarks