|
-
Sep 9th, 2002, 04:00 AM
#1
Thread Starter
New Member
Passing value to class By Reference
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
-
Sep 9th, 2002, 08:07 AM
#2
Fanatic Member
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.
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
|