[RESOLVED] Dynamic fields in Excel userform
Hi all -
I'm real new to VBA (yesterday, for that matter) and I've managed to create a simple userform that grabs data, passes it to my procedure and then spits out some output very nicely.
Now to my problem:
What I'd like to do is to create another userform that takes a user-entered number, say '6', and then will generate another user input form with 6 entry fields that will be loaded into an array for future processing.
I've searched high and low and couldn't find what seems to be a solution, but that also could be a function of my basic VBA knowledge. Any help and/or alternative methods appreciated.
Thanks!
Re: Dynamic fields in Excel userform
Quote:
What I'd like to do is to create another userform that takes a user-entered number, say '6', and then will generate another user input form with 6 entry fields that will be loaded into an array for future processing.
i am sure this would be simple if i could understand what you want to do
for a guess it you want to load a form with ? number of textboxes, you could create a form with the maximum number of possibly required boxes, set all to visible = false then just set the required number to visible = true, possibly resize the form to suit the number of boxes
Code:
for i = 1 to numrequired
useform1.controls("textbox" & i).visible = true
next
where number required is the value entered in the textbox in first form
there would be several methods to do like this