R
Roger Lord
I have a form with 20 labels on it among other things. The
data that goes into these labels comes from an array whose
number of elements far exceeds 20. Given that, I am using a
"Next Page" & "Previous Page" scheme so that I can look at
20 items at a time.
The names of the labels are: lblName01 ... lblName20
I want to be able to construct in code the name of each
label and then fill each one via its Caption property in a
"For I = 1 to 20" loop. I tried this by creating the name
of each label as a string variable called txtName (easy to
do), but my program bombs when I try to set the caption as
follows: txtName.Caption = MyArray(I). The error I get is
"Invalid qualifier" pointing to txtName.
I'm clearly doing something wrong. Can this be done? If
so, how?
Thanks,
Roger
data that goes into these labels comes from an array whose
number of elements far exceeds 20. Given that, I am using a
"Next Page" & "Previous Page" scheme so that I can look at
20 items at a time.
The names of the labels are: lblName01 ... lblName20
I want to be able to construct in code the name of each
label and then fill each one via its Caption property in a
"For I = 1 to 20" loop. I tried this by creating the name
of each label as a string variable called txtName (easy to
do), but my program bombs when I try to set the caption as
follows: txtName.Caption = MyArray(I). The error I get is
"Invalid qualifier" pointing to txtName.
I'm clearly doing something wrong. Can this be done? If
so, how?
Thanks,
Roger