I have 5 lbls, lbl1, lbl2, lbl3, etc.
I have a string with 5 letters. I want to put one letter in each label. Is it possible to concatinate the name so that I don't have to go through each label? Here is my code which does not work:
I tried it a few different ways but all produced errors.
Any suggestions?
Thanks!
I have a string with 5 letters. I want to put one letter in each label. Is it possible to concatinate the name so that I don't have to go through each label? Here is my code which does not work:
Code:
While i < Len(strName)
i = i + 1
num = Mid(strName, i, 1)
lbl = "lbl" & i
Call FillID(lbl, num)
Wend
End Sub
Private Sub FillID(lbl As Label, idNum)
lbl.Caption = idNum
End Sub
I tried it a few different ways but all produced errors.
Any suggestions?
Thanks!