Sure, I would probably just create an array with your labels. Then you could create a for loop and in that loop pick a random name and add it to the label using the values in the array. An example would be clearer so here you go. This example requires a form with 3 labels named label1, label2, label3 and a button.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myLabels As Label() = {Label1, Label2, Label3}
For x As Integer = 0 To myLabels.Length - 1
myLabels(x).Text = x.ToString
Next
End Sub</pre>
Enter your message below
Sign in or Join us (it's free).