Heeeeey guys
I'm hoping this is a quick simple one
I have a user form with a combo box that allows the user to select a team name.
The next combo box I want to populate with tasks based on the team selected in combo box 1. I also need to apply this same code to 5 more combo boxes. (The user will be from one team but may be supporting another team so we are adding blank 'rows' to the user form for them to select the work that they have done for another team.)
Here is the code I have so far. The combo box 1 works fine. How can I get combo box 2 to select different lists of tasks based on what the first combo box says??
Thanks in advance
I'm hoping this is a quick simple one
I have a user form with a combo box that allows the user to select a team name.
The next combo box I want to populate with tasks based on the team selected in combo box 1. I also need to apply this same code to 5 more combo boxes. (The user will be from one team but may be supporting another team so we are adding blank 'rows' to the user form for them to select the work that they have done for another team.)
Here is the code I have so far. The combo box 1 works fine. How can I get combo box 2 to select different lists of tasks based on what the first combo box says??
Code:
'Create Option List of Team Names
Dim ctrl As MSForms.Control
For Each ctrl In Controls
If TypeOf ctrl Is MSForms.ComboBox Then
If ctrl.Name Like "TeamNameCombo*" Then ctrl.List = Array("Golf", "Passat", "Polo", "Scirocco", "Touran")
End If
Next ctrl
'Create Option List of Team Names
For Each ctrl In Controls
If TypeOf ctrl Is MSForms.ComboBox Then
If ctrl.Name Like "TaskCombo*" Then ctrl.List = Array("Refunds", "Write Offs", "Cancellations", "Modifications", "Indemnities", _
"Clearances", "Partial Payments New (Spreadsheet)", "Partial Payments IP (CRM7 Queue)", "Right of Withdrawals (Spreadsheet)", _
"Refund Exceptions", "PSO Report", "CSD Credit report (new and in progress)", "Refund FixesRefunds (CRM7 Queue)", _
"Bank Report", "Deletion Report")
End If
Next ctrl
Thanks in advance