View Single Post
 
Old 06-24-2014, 08:42 AM
jpb103's Avatar
jpb103 jpb103 is offline Windows 7 64bit Office 2007
Advanced Beginner
 
Join Date: May 2014
Location: Thunder Bay, Ontario
Posts: 58
jpb103 is on a distinguished road
Default

I would use a couple of comboboxes for this. I'd name the first one ComboTeam and the second one ComboPlayers. Then you just need to do some coding in the ComboTeam_Change() sub (it executes the code in this section each time a team is selected). The code would consist of a Select case statement something like this:
Code:
Private Sub ComboTeam_Change()
ComboPlayers.Clear
Select Case ComboTeam.Text
    Case "Swansea"
        ComboPlayers.AddItem "SwanseaPlayerName1"
        ComboPlayers.Additem "SwanseaPlayerName2"
        ...
    Case "Man United"
        ComboPlayers.AddItem "ManUnitedPlayerName1"
        ...
    Case Else
        ComboPlayers.AddItem "Please select a valid team"
End Select
End Sub
Alternatively, and instead of manually coding each player name like this, you could put each player list into text files and load them into an array.
Reply With Quote