Hi, minifreak,
the normal to attach to the button is simply the call the userform:
Sub CallUF()
UserForm1.Show
End Sub
Behind the userform place the following code
Private Sub ComboBox1_Change()
With ComboBox2
.Clear
.ListIndex = -1
Select Case ComboBox1.Value
Case "X"
.AddItem "X 1"
.AddItem "X 2"
.AddItem "X 3"
Case "Y"
.AddItem "Y 1"
.AddItem "Y 2"
.AddItem "Y 3"
Case "X"
.AddItem "Z 1"
.AddItem "Z 2"
.AddItem "Z 3"
End Select
End With
End Sub
Private Sub UserForm_Activate()
ComboBox2.ListIndex = -1
With ComboBox1
.Clear
.AddItem "X"
.AddItem "Y"
.AddItem "Z"
End With
End Sub
Please alter the names to suit. Within the Select Case you can add other or more items if wanted.
Ciao,
Holger
Bookmarks