(Solved) – How to add excel vba combobox dependent on another combobox in Userform without affecting clear data function after click on save button

(solved)-–-how-to-add-excel-vba-combobox-dependent-on-another-combobox-in-userform-without-affecting-clear-data-function-after-click-on-save-button

I trying to add combobox (“Product”) dependent on another combobox (“Insurance Rate”) in Userform. But after i add in this two combo box and try to click on “Command Button Save”, the combox “Product” name still exist in the comboBox. By default before add in combobox (“Product”) dependent on another combobox, it will reflect auto clear function after save command button.Hopefully someone can help to fix this issue, thank you very much. Below is the code. I have refer Me.cmbPro.Rowsource from worksheet “Product”

Private Sub cmbPro_Change()

Me.CmbIns = “”
Select Case Me.cmbPro
Case “Product”
Me.CmbIns.RowSource = “Product”
Case “GAA”
Me.CmbIns.RowSource = “GAA”
Case “GPPS”
Me.CmbIns.RowSource = “GPPS”
Case “Propylene”
Me.CmbIns.RowSource = “Propylene”

End Select
End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *