View Full Version : Variables when referring to object names


darkmastergyz
08-02-2007, 09:32 AM
Hi! I have a few objects:

txtLabel1
txtLabel2
txtLabel3
.
.
.
They're all are incrementing in that order, so is there a way I can do the
me.txtLabel[number here], through a variable.

so, for example, var_num = 3
me.txtLabel + var_num (except that doesn't work)

How can I do that? Thanks.

RoyVidar
08-02-2007, 09:35 AM
Me.Controls("txtLabel" & var_num) or just
Me("txtLabel" & var_num)