|
-
Jul 22nd, 2014, 02:25 PM
#1
Thread Starter
Member
[RESOLVED] Create combobox object in code
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
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|