excel - Assign textbox values to corresponding cells based on name -


I have a set of text boxes on a form called sm1, sm2 etc., and I call it A1 cells I want to assign, A2, etc. There is a way to put it in a loop, i.e.:

  i = 1 to 100 cells (i, 1). Value = ("SM" & amp; c) .Value Next I  

Not sure about, but the collection must be "control" on the form, you can access the elements of the control name on it, as you would see above.

  Cell (i, 1). Value = control ("SM" & amp; c). Value  

Comments