Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you're in the userform_initialize event (or anywhere in the userform module),
you could use: With Me (instead of With Userform1) so dim iCtr as long for ictr = 1 to 13 'lbound(myArray) to ubound(myArray) me.controls("txbox" & ictr).value = myarray(ictr) next ictr The names and array bounds have to be in sync. Al_82 wrote: I have a UserForm with an array of TextBoxes that allows the user to edit selected data arrays from a larger database. To load these TextBoxes I can use a brute force method: With UserForm1 .txBox1 = array(1) .txBox2 = array(2) etc but it would obviously be better to do this in a loop. My problem is I cant figure how to synthesize the TextBox names so I can use a loop to functionally do: .txBoxn= array(n) Can someone tell me how to do this? -- Al_82 -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Show Results in TextBoxes, ONLY if All TextBoxes have Data in them | Excel Programming | |||
Looping thru TextBoxes | Excel Programming | |||
Looping through textboxes | Excel Discussion (Misc queries) | |||
sum of textboxes | Excel Programming | |||
Userform Textboxes and Looping | Excel Programming |