jackass209
New Member
- Joined
- Jul 14, 2007
- Messages
- 49
I've got a userform which adds Textboxes automatically depending on a certain value. And the amount of Textboxes varies from 1 - 100. I add them with the line:
Set MyControl = UserForm1.Frame1.Controls.Add("forms.textbox.1", strControl, Visible)
Now my question is:
Can I add a macro to each of these textboxes automatically? A macro for the Change event I think it is.
All textboxes would have the same macro.
I kinda hoped it would be one of the following:
MyControl.OnAction = "test"
MyControl.Change = "test"
But you guessed it, that doesn't work!
Hope someone can help me out. Thanks!
Set MyControl = UserForm1.Frame1.Controls.Add("forms.textbox.1", strControl, Visible)
Now my question is:
Can I add a macro to each of these textboxes automatically? A macro for the Change event I think it is.
All textboxes would have the same macro.
I kinda hoped it would be one of the following:
MyControl.OnAction = "test"
MyControl.Change = "test"
But you guessed it, that doesn't work!
Hope someone can help me out. Thanks!