calling objects method

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
 
D

Dirk Goldgar

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top