I have following code working.
Me.lbl1.Name
But I have a bunch of these labels, so how can I make the last line work?
Dim numberTry As Integer
numberTry = 1
Dim outputString As String
outputString = "lblCmd" & numberTry
Me.[outputString].Name
Any help or suggestion is greatly appreciated!!!
You can refer to a control by name if you use parentheses () and drop the dot.
So:
outputString = "lblCmd" & numberTry
Me(outputString).Name