Thread: Collections??
View Single Post
  #1  
Old 25-03-2008, 14:57
bprice's Avatar
bprice bprice is offline
Member
 
Join Date: Oct 2006
Location: Edmundston, New Brunswick, Canada
Posts: 89
Default Collections??

Forgive my ignorance, as VB is something I only mess around with occasionally...

If I do something like:

Dim Stuff as New Collection
Stuff.Add (Object1)
Stuff.Add (Object2)

For Each Thing in Stuff
Call Myfunction(Thing)
Next Thing

And Then a function that has:

Function MyFunction(ByRef ItemName As Object) As Object
ItemName.Text = "balh blah blah"
End Function

What am I doing wrong... I try something like this... and it gets to the "Call Myfunction(Thing) and says an object is required... I thought "thing" was an object (on each next it changes through the list of objects) because is added it to the stuff collection... object1, object 2 etc.

What am I doing wrong?

Thanks in Advance

B
Reply With Quote