Hi Markus,
The following code will add textbox(s) to a second userform from the number entered in a textbox on the first userform. The code assumes the following but you can change them:
FIRST USERFORM:
Name: arbitrary
one textbox name: TextBox1
one commandbutton name: CommandButton1
SECOND USERFORM:
Name: UserForm2
Can include any objects you like except textboxes named "TextBox1, TextBox2, etc."
You can change the parameters (height, width, left, top, value, naming convention, etc). Remember that the textboxes are created at runtime and will not be prest after the code is finished running. Therefore, you want to initiate Userform2 in the code from commandButton1 on UserForm1 and continue running your code from the second userform in a continuous flow.
If possible, a better approach is to have all the textboxes with .visible = FALSE on userform2 at design time and set their .visibility to TRUE as needed.
HTH,
Maud
Bookmarks