I have 10 labels, with a dropdown box, the user selects 10-20, 20-30 etc, according to that choice i need to change the labels.
This is what i have, but it does not work right, any help please?
The First one works, but when i select 20-30 it makes everything 30.
Thank you
This is what i have, but it does not work right, any help please?
VB.NET:
Dim selectedIndex As Integer
selectedIndex = SelectionBox.SelectedIndex
Dim selectedItem As Object
selectedItem = SelectionBox.SelectedItem
Dim st1 As String = "Num" ' This is the Label name (Num1,Num2,etc)
If selectedItem = "10-20" Then
For y As Integer = 1 To 10
Me.Controls(st1 & y.ToString).Text = y
Next
ElseIf selectedItem = "20-30" Then
For y As Integer = 1 To 10
For z As Integer = 20 to 30
Me.Controls(st1 & y.ToString).Text = Z
Next
Thank you