Hello,
I'm working on my Final Project for my Computer Programming class, and I need some help on a problem that i've ran into.
My group is creating a Rock-Paper-Scissors Game and my part of it is making alphabetizing the scores and names.
This is most of the code that I'm currently using:
On Form Load, I load the name from the Array and use AddItem to add random names for Sorting.
Whenever I press the button cmdScores, which should be sorting the listbox, nothing happens.
I'd appreciate any help. Thanks
I'm working on my Final Project for my Computer Programming class, and I need some help on a problem that i've ran into.
My group is creating a Rock-Paper-Scissors Game and my part of it is making alphabetizing the scores and names.
This is most of the code that I'm currently using:
Code:
Private Sub cmdScores_Click()
Do While blnAlpha = False
blnAlpha = True
For bytIndex = LBound(strAlpha) To (UBound(strAlpha) - 1)
If Trim(UCase(strAlpha(bytIndex))) > Trim(UCase(strAlpha(bytIndex + 1))) Then
strAlpha(bytIndex + 1) = strAlpha(bytIndex)
strTemp = strAlpha(bytIndex + 1)
strAlpha(bytIndex) = strTemp
blnAlpha = False
End If
Next
Loop
cmdScores.Enabled = False
'For bytIndex = LBound(strAlpha) To UBound(strAlpha)
' If strAlpha(bytIndex) > " " Then 'Removes spaces when words are inputted and sent to the listbox
' lstPName.AddItem (strAlpha(bytIndex))
' End If
'Next
End Sub
Whenever I press the button cmdScores, which should be sorting the listbox, nothing happens.
I'd appreciate any help. Thanks