| || |
how to capture return type from a function
hi guys ,
I have used a fn to retreive the child objects with in a parent hirerchy.The fn takes root from the .tsr file of OR
and retreives the parent,child,sub child....its a recurssive fn.i need to catch the return values from the fn and place it in an excel accordingly so that i can use the hirearchy to perform an action on any object.plz provide me the solution.
the fn is as follows...
Dim TOCollection, TestObject, PropertiesCollection, Property1, Msg
Set TOCollection = RepositoryFrom.GetChildren(Root)
For i = 0 To TOCollection.Count - 1
Set TestObject = TOCollection.Item(i)
Set TOCollection =nothing
Set Property1 =nothing
Set PropertiesCollection =nothing
I used msgbox to know what it is retreving.
Re: how to capture return type from a function
I am not sure what you are trying to do here, but you return a value from a vbScript function as follows:
<font class="small">Code:</font><hr /><pre>
function foo ()
And if foo returns an object reference to myObj, the return syntax would be:
A few more suggestions here:
- Do not text in your postings on the forum (i.e. fn should be function, plz should be please).
- Spell check your postings.
- Spend some time learning about basic vbScript. Start with this posting from the forum's FAQ:
2 vbScript FAQ:
2.C http://www.activexperts.com/activmon...t/adminscripts --many useful scripts and examples