How can i pass values, by reference, say a list box in my main form, to my class routine. I want to create a class that searches for an item in a list box and returns True if found else false.
Please Help me on this
Printable View
How can i pass values, by reference, say a list box in my main form, to my class routine. I want to create a class that searches for an item in a list box and returns True if found else false.
Please Help me on this
vb6 although it will not complain if in your class you do
public sub returnlist(byref objListBox as ListBox)
it will not work.
In your class Do:
public sub returnlist(byref objListBox as object)
then code with the assumption that objlistbox has all the properties/methods of a listbox, this will work.
You can leave the declaration as listbox while coding this will give you the context sensative help, but remember to set it back to object before you run.