![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 2
|
I have a User Form with text boxes and drop lists with similar names but with sequential numbers at the end (i.e., Name1, Name2, Name3).
I would like to create a loop in VBA that cycles through each name, using a FOR NEXT loop as the counter. How can you concatenate the "Name" and sequential number and use it to retrieve the information in the text box or drop list? |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Assuming they are called Name1, Name2 etc all the way up to Name10, this code will sequentially set the focus in each one. (Although this is a bad example since it will run too fast to see, but it gets the idea across.)
HTH. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|