saint_lundie
New Member
- Joined
- May 9, 2014
- Messages
- 3
Hi,
I am using a number of userforms containing textboxes to gather data from users. Within a module i would then like to iterate through each textbox in each userform and assign the value of the textbox to a variable:
I have tried a few different things but with no success. Below is the code that i know is incorrect buy gives an example of what i am trying to do
Thanks in advance for any help
I am using a number of userforms containing textboxes to gather data from users. Within a module i would then like to iterate through each textbox in each userform and assign the value of the textbox to a variable:
I have tried a few different things but with no success. Below is the code that i know is incorrect buy gives an example of what i am trying to do
Code:
For n = 1 To UserForm1.NumRun.Value ' NumRun is another textbox that gives the total number of userforms
For i = 1 To 8
Ref = UserForm & n.TextBox & i.Value
' do something with Ref
next i
next n
Thanks in advance for any help