Conditional list not working

vbaBaby

New Member
Joined
Mar 27, 2015
Messages
12
Hi

I've created a number of conditional drop-down lists in a userform. Where the section made in one field will affect the list that's returned in another. Now most of the lists are working fine but there's just this one that is unrelenting and refusing to work. When you click on the drop-down it brings back a blank field. I've checked as far as I know and cannot find the error anywhere. It was working fine after I had added the code but suddenly stopped working. Below is the code - where I want it to lists of Skills in the Skills ComboBox.

Code:
Private Sub WorkCategory_Change()'Returns details of activity
    If StatsCapture.WorkCategory.Value = "Year End - PinPoint" Then
        StatsCapture.ActivityTextBox.RowSource = "Year_End"
    ElseIf StatsCapture.WorkCategory.Value = "Year End - DISCribe" Then
        StatsCapture.ActivityTextBox.RowSource = "Year_End"
    ElseIf StatsCapture.WorkCategory.Value = "Additional Work" Then
        StatsCapture.ActivityTextBox.RowSource = "Additional_work"
    ElseIf StatsCapture.WorkCategory.Value = "Downtime" Then
        StatsCapture.ActivityTextBox.RowSource = "Downtime"
    Else
        StatsCapture.ActivityTextBox.RowSource = "Activity"
    Exit Sub
    End If
    
'Returns the alert category
    If StatsCapture.WorkCategory.Value = "Alert" And StatsCapture.Company.Value = "Discovery Health" Then
        StatsCapture.Skill.RowSource = "Health_Skills"
    ElseIf StatsCapture.WorkCategory.Value = "Alert" And StatsCapture.Company.Value = "InHouse" Then
        StatsCapture.Skill.RowSource = "InHouse_Skill"
    ElseIf StatsCapture.WorkCategory.Value = "Alert" And StatsCapture.Company.Value = "Discovery Vitality - V302" Then
        StatsCapture.Skill.RowSource = "Vitality_Skills"
    ElseIf StatsCapture.WorkCategory.Value = "Alert" And StatsCapture.Company.Value = "DiscoveryCard - V302" Then
        StatsCapture.Skill.RowSource = "Card_Skills"
    ElseIf StatsCapture.WorkCategory.Value = "Alert" And StatsCapture.Company.Value = "Discovery Insure - A100" Then
        StatsCapture.Skill.RowSource = "Insure_Skill"
    ElseIf StatsCapture.WorkCategory.Value = "Alert" And StatsCapture.Company.Value = "Discovery Group Life - G606" Then
        StatsCapture.Skill.RowSource = "Life_Skills"
    ElseIf StatsCapture.WorkCategory.Value = "Alert" And StatsCapture.Company.Value = "Discovery Individual Life - I638" Then
        StatsCapture.Skill.RowSource = "Life_Skills"
    ElseIf StatsCapture.WorkCategory.Value = "Alert" And StatsCapture.Company.Value = "Discovery Invest DrO - 638" Then
        StatsCapture.Skill.RowSource = "Invest_Skills"
    ElseIf StatsCapture.WorkCategory.Value = "Alert" And StatsCapture.Company.Value = "Discovery Invest non-DrO - 634" Then
        StatsCapture.Skill.RowSource = "Invest_Skills"
    ElseIf StatsCapture.WorkCategory.Value = "Alert" And StatsCapture.Company.Value = "Discovery Sales" Then
        StatsCapture.Skill.RowSource = "Sales_Skills"
    ElseIf StatsCapture.WorkCategory.Value = "Alert" And StatsCapture.Company.Value = "The Vitality Group" Then
        StatsCapture.Skill.RowSource = "TVG_Skills"
    ElseIf StatsCapture.WorkCategory.Value = "Alert" And StatsCapture.Company.Value = "VitalityHealth" Then
        StatsCapture.Skill.RowSource = "Vitality_Health_Skills"
    ElseIf StatsCapture.WorkCategory.Value = "Alert" And StatsCapture.Company.Value = "VitalityLife - Q621" Then
        StatsCapture.Skill.RowSource = "VitalityLife_Skills"
    Else
        StatsCapture.Skill.RowSource = ""
    Exit Sub
    End If
End Sub

Any ideas of where I'm going wrong or what I need to change?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top