Hi everybody. I have an application that uses VBA in Excel to access values in ComboBox and ListBox.
Here is the code for ComboBox:
Then I have a custom API that takes myCB as an argument.
The above works fine, but using ListBox fails. Code:
The Set command throws a Type Mismatch error. Why?
(Yes, I have both a Combobox and ListBox in my form)
Any help here would be jolly good.
Thanks,
Here is the code for ComboBox:
Code:
Dim myCB As ComboBox
Set myCB = UserForm1.ComboBox1
The above works fine, but using ListBox fails. Code:
Code:
Dim myLB As ListBox
Set myLB = UserForm1.ListBox1
(Yes, I have both a Combobox and ListBox in my form)
Any help here would be jolly good.
Thanks,