B
BV2312
Hi all
I am trying to use the following code in VBA however i seem to get an error
about compiling it.....
I copied this from:
Combo Box Content depending on result of another combo box
In: microsoft.public.word.vba.userforms
Private Sub UserForm_Initialize()
ComboBox1.List = Array("Cat", "Dog")
ComboBox1.ListIndex = 0
End Sub
Private Sub ComboBox1_Change()
Select Case ComboBox1.Text
Case "Cat"
With ComboBox2
.Clear <--------------------------------
.List = Array("Purr", "Meow", "Catnip")
.ListIndex = 0
End With
Case "Dog"
With ComboBox2
.Clear
.List = Array("Bark", "Wag", "Dog Toy")
.ListIndex = 0
End With
Case Else
' ignore
End Select
End Sub
the error accurs at .clear
Hope this helps
I am trying to use the following code in VBA however i seem to get an error
about compiling it.....
I copied this from:
Combo Box Content depending on result of another combo box
In: microsoft.public.word.vba.userforms
Private Sub UserForm_Initialize()
ComboBox1.List = Array("Cat", "Dog")
ComboBox1.ListIndex = 0
End Sub
Private Sub ComboBox1_Change()
Select Case ComboBox1.Text
Case "Cat"
With ComboBox2
.Clear <--------------------------------
.List = Array("Purr", "Meow", "Catnip")
.ListIndex = 0
End With
Case "Dog"
With ComboBox2
.Clear
.List = Array("Bark", "Wag", "Dog Toy")
.ListIndex = 0
End With
Case Else
' ignore
End Select
End Sub
the error accurs at .clear
Hope this helps