I have a user form with a two combo boxes wheras one reads 'Main Category' and the other 'Sub Category'.
To make it simple here is a little preview:
Main Category: Plumbing
Sub Category: Showers, Toilets, Doors
Main Category: Electricity
Sub Category: Switches, Receptacles, Wires
The Code of my Main Category is as follows and works fine:
Private Sub UserForm_Initialize()
Dim rngColor As Range
Dim ws As Worksheet
Set ws = Worksheets("Categories")
For Each rngColor In ws.Range("MainCategories")
Me.cbomaincategory.AddItem rngColor.Value
Next rngColor
End Sub
Is it possible tough to create a code that is dynamic (adding a new item will automatically show up in user form) and dependent (sub category is dependent on value of main category)?
*I tried Excel Data Validation, but it seems not to comply when using user forms...
Bookmarks