Control combobox item selections without using events
Posted on 2002-04-24
I have 2 forms A and B but from B
I'd like to control some functionality that is in
A without any user event in A.
Specifically I have a combobox in A and I want to get an item interacting thru the items that are already loaded in the combobox BUT with no Click event or other user event.
I have this portion of code
Public Sub C()
Dim i As Long
For i = 0 To cboWorktype.ListCount - 1
If cboWorktype.ItemData(i) = "Hello" Then
cboWorktype.ListIndex = i
I want to find the item "Hello" that is loaded in the combo.
Listcount is returning back 0 as if there are no items in there, how can I detect that the items are there with no user events?