Hi all
I have 3 dependant comboboxes:
cmb_NumberOfTeams is on Userform_Setting.
cmb_ChosenTeam and cmb_Team are on Userform_Badge.
I'm trying to get the value of cmb_NumberOfTeams each time I launch Userfom_Settings so that I get the last value of Userform_Badge.
Below is the code that link the comboboxes.
Private Sub cmb_NumberOfTeams_Change()
If Me.cmb_NumberOfTeams = 1 Then
Me.cmb_ChosenTeam.List = Array("#1")
Me.cmb_Team.List = Array("#1")
ElseIf Me.cmb_NumberOfTeams.Value = 2 Then
Me.cmb_ChosenTeam.List = Array("All", "#1", "#2")
Me.cmb_Team.List = Array("#1", "#2")
ElseIf Me.cmb_NumberOfTeams.Value = 3 Then
Me.cmb_ChosenTeam.List = Array("All", "#1", "#2", "#3")
Me.cmb_Team.List = Array("#1", "#2", "#3")
ElseIf Me.cmb_NumberOfTeams.Value = 4 Then
Me.cmb_ChosenTeam.List = Array("All", "#1", "#2", "#3", "#4")
Me.cmb_Team.List = Array("#1", "#2", "#3", "#4")
ElseIf Me.cmb_NumberOfTeams.Value = 5 Then
Me.cmb_ChosenTeam.List = Array("All", "#1", "#2", "#3", "#4", "#5")
Me.cmb_Team.List = Array("#1", "#2", "#3", "#4", "#5")
ElseIf Me.cmb_NumberOfTeams.Value = 6 Then
Me.cmb_ChosenTeam.List = Array("All", "#1", "#2", "#3", "#4", "#5", "#6")
Me.cmb_Team.List = Array("#1", "#2", "#3", "#4", "#5", "#6")
End If
End Sub
Any suggestion will be greatly appreciated