View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Loading Multiple TextBoxes

Another alternative would be to create a control array at design time
(rather than at run time as the previous explanation). To do this, you
name all of the textboxes the same and give them incrementing index
attribute. I would guess that VBA will ask if you want to create a
control array as soon as you try to name two of them the same (VB6
does)... Look uo control arrays in the help files for more information
on how to use them. You can then execute simple loops to load/store
the data based on the events you want to trigger them (on form load, on
button press, etc...)

David


A Control Array in the VB6 sense is not available in VBA userforms as was
pointed out by many just the other day.

http://tinyurl.com/n8vvs

Look into an array or collection of class's of With Events msforms.TextBox,
many examples in this ng.

Regards,
Peter T