At initialization of the userform you get the comboboxes filled, except the cboStreet
Private Sub Userform_Initialize()
'your code
FillCBs
'your code
End Sub
The following fills in your comboboxes:
Private Sub FillCBs()
With cboRoadway
.AddItem ("RW1")
.AddItem ("RW2")
.AddItem ("RW3")
.AddItem ("RW4")
End With
'and so on
End Sub
The following runs when user selects any out of the dropdown:
Private Sub cboRoadway_Change(): FillcboStreet: End Sub
Sub FillcboStreet()
Select Case cboRoadway
Case "RW1"
cboStreet.Clear
With cboStreet
.AddItem ("S11")
.AddItem ("S12")
.AddItem ("S13")
.AddItem ("S14")
End With
Case "RW2"
cboStreet.Clear
With cboStreet
.AddItem ("S21")
.AddItem ("S22")
.AddItem ("S23")
.AddItem ("S24")
End With
Case "RW3"
cboStreet.Clear
With cboStreet
.AddItem ("S31")
.AddItem ("S32")
.AddItem ("S33")
End With
' and so on
Case Else
cboStreet.Clear
End Select
End Sub
If I'm not mistaken about the request.
Not tested.
Bookmarks