Stubby
Board Regular
- Joined
- Mar 5, 2002
- Messages
- 188
Hi
I have a userform with 5 labels on it named Lbl1, Lbl2,Lbl,Lbl4 and Lbl5.
I need to change the Caption of each label to a value that will be gained from the spreadsheet which I know I can do with code. What i would like to know is if it is possible to loop through form control names to change the caption! i'm thinking something along the lines of
x=1
for each label in userform1
lbl&x.caption=range("a1")
x=x+1
next
any help will be much appreciated
I have a userform with 5 labels on it named Lbl1, Lbl2,Lbl,Lbl4 and Lbl5.
I need to change the Caption of each label to a value that will be gained from the spreadsheet which I know I can do with code. What i would like to know is if it is possible to loop through form control names to change the caption! i'm thinking something along the lines of
x=1
for each label in userform1
lbl&x.caption=range("a1")
x=x+1
next
any help will be much appreciated