Guest_imported
New member
- Jan 1, 1970
- 0
I was wondering if I could use VBA to change the name of a label on a form. For example, I have 20 labels named Label1, Label2, Label3,... and so on. Is there a way that I can use something like:
Dim lbl As Label
For num = 0 To 20
lbl.Name = "Label" & num
lbl.Caption = DLookup(something)
Next
I can't get it to work. Thanks.
Dim lbl As Label
For num = 0 To 20
lbl.Name = "Label" & num
lbl.Caption = DLookup(something)
Next
I can't get it to work. Thanks.