i'm trying build 1 variable array, that must be object type for saving the objects names...
heres how i declare the variable:
now i put some objects names in listbos(string, of course)...Code:Public ObjectsName() As Object Public NumberObjects As Long
then i must put them in variable array(ObjectsName()) using the listcount property i redim the variable....
heres the code:
and heres how i will use it:Code:NumberObjects = lstAddCollisionObject.ListCount ReDim ObjectsName(NumberObjects) For i = 0 To NumberObjects Set ObjectsName(i).Name = lstAddCollisionObject.List(i) Next i
the collision() function only acept objects name(the arguments are objects)...Code:For i = 0 To NumberObjects If Collision(extender.name, ObjectsName(i), ObjectsName(i)) = True Then RaiseEvent Collision(ObjectsName(i)) End If Next i
note: these objects name are the objects that is puted in form, but the names are manualy declared...
i recive errors... can anyone tell me what isn't right?
thanks





Reply With Quote