I try to create a userform using Comboboxes, here the value of Box3 depends on the choice made in Box2. My code does not work. Someone a solution? Kind regards
Private SubUserForm_Initialize()
ComboBox1.List= Array("BIO", "LAN", "MAT", "Prodem")
ComboBox2.List = Array("klimaat","stoten")
1
IfComboBox2.Value = "klimaat" Then
ComboBox3.List= Array("ijsvorming", "ondergrond")
ElseIf ComboBox2.Value = "stoten"Then
ComboBox3.List =Array("ergonomie", "omgeving")
ElseIf ComboBox2.Value = "" ThenApplication.Wait (Now + TimeValue("0:00:10"))
GoTo 1
End If
End Sub
Private SubUserForm_Initialize()
ComboBox1.List= Array("BIO", "LAN", "MAT", "Prodem")
ComboBox2.List = Array("klimaat","stoten")
1
IfComboBox2.Value = "klimaat" Then
ComboBox3.List= Array("ijsvorming", "ondergrond")
ElseIf ComboBox2.Value = "stoten"Then
ComboBox3.List =Array("ergonomie", "omgeving")
ElseIf ComboBox2.Value = "" ThenApplication.Wait (Now + TimeValue("0:00:10"))
GoTo 1
End If
End Sub