Hi
I have 20 labels in a panel - lbl_1Score, lbl_2Score ....... lbl_20Score.
There is a variable lng_Target which will iterate from 1 to 20 each time a button is clicked.
I would like to reference each of labels, dependent upon the lng_Target value and update the text of that specific label.
Example: When lng_Target = 1 I need to reference lbl_1Score, when lng_Target =2 I need to reference lbl_2Score, etc, updating the text of the label.
Is there code similar to :
With Views("lbl_" & lng_Target & "Score")
.Text = lng_Target
End With
Other wise I would have to write 20 Select Case lines.
Thanks for any replies.
Mosiki.
I have 20 labels in a panel - lbl_1Score, lbl_2Score ....... lbl_20Score.
There is a variable lng_Target which will iterate from 1 to 20 each time a button is clicked.
I would like to reference each of labels, dependent upon the lng_Target value and update the text of that specific label.
Example: When lng_Target = 1 I need to reference lbl_1Score, when lng_Target =2 I need to reference lbl_2Score, etc, updating the text of the label.
Is there code similar to :
With Views("lbl_" & lng_Target & "Score")
.Text = lng_Target
End With
Other wise I would have to write 20 Select Case lines.
Thanks for any replies.
Mosiki.