I am using VB6, SP5.

I need to call a routine that takes a combobox as a parameter. I am doing something like this:

Dim cboTest as ComboBox

sLoadItems cboTest

if cboTest.ListCount >0 then
msgbox cboTest.ListCount & " items were loaded"
else
msgbox "No items were loaded"

end if

Seems simple enough; however, it produces error 91, Object not set. I tried changing the declaration to the following:

Dim cboTest as New ComboBox

Now it gives me the error that I am using the New keyword incorrectly.

Set cboTest = new ComboBox

This produces the same results. What am I missing?

I do not want to add the combo box to the GUI; I do not have one since my code resides in a module. Thank you, Saga