L
lilloc15552
Guest
What kind of looping code can I use to be able to assign one letter from a word, to a label, this is how I am doing it now, but there has to be a better way:
Select Case len11
Case 3
Label217.Text = word11.Substring(0, 1)
Label197.Text = word11.Substring(1, 1)
Label177.Text = word11.Substring(2, 1)
Case 4
Label217.Text = word11.Substring(0, 1)
Label197.Text = word11.Substring(1, 1)
Label177.Text = word11.Substring(2, 1)
Label157.Text = word11.Substring(3, 1)
Case 5
Label217.Text = word11.Substring(0, 1)
Label197.Text = word11.Substring(1, 1)
Label177.Text = word11.Substring(2, 1)
Label157.Text = word11.Substring(3, 1)
Label137.Text = word11.Substring(4, 1)
Case 6
Label217.Text = word11.Substring(0, 1)
Label197.Text = word11.Substring(1, 1)
Label177.Text = word11.Substring(2, 1)
Label157.Text = word11.Substring(3, 1)
Label137.Text = word11.Substring(4, 1)
Label117.Text = word11.Substring(5, 1)
End Select
Continue reading...
Select Case len11
Case 3
Label217.Text = word11.Substring(0, 1)
Label197.Text = word11.Substring(1, 1)
Label177.Text = word11.Substring(2, 1)
Case 4
Label217.Text = word11.Substring(0, 1)
Label197.Text = word11.Substring(1, 1)
Label177.Text = word11.Substring(2, 1)
Label157.Text = word11.Substring(3, 1)
Case 5
Label217.Text = word11.Substring(0, 1)
Label197.Text = word11.Substring(1, 1)
Label177.Text = word11.Substring(2, 1)
Label157.Text = word11.Substring(3, 1)
Label137.Text = word11.Substring(4, 1)
Case 6
Label217.Text = word11.Substring(0, 1)
Label197.Text = word11.Substring(1, 1)
Label177.Text = word11.Substring(2, 1)
Label157.Text = word11.Substring(3, 1)
Label137.Text = word11.Substring(4, 1)
Label117.Text = word11.Substring(5, 1)
End Select
Continue reading...