calling objects method

  • Thread starter Thread starter rocco
  • Start date Start date
R

rocco

Hello,
I have a collection of objects. Each object has few properties and few
methods, among which: save, delete, recall and others.
The "save" method of each object runs few private class functions to double
check data and if everything is fine it adds the data collected in few tables.
I would need a way to iterate the objects in the Collection (and I know how
to do this) and call for each of them the "save" method. Is this possible?
Hoping first it is clear...

Thanks,
Rocco
 
rocco said:
it should be:
myCollectionName.Item(itemIndex).Save

...I guess...


That would work. Or you could write:

Dim obj As Object

For Each obj In myCollectionName
obj.Save
Next obj
 
Back
Top