Link to home
Start Free TrialLog in
Avatar of jefcheek
jefcheek

asked on

How to identify the class of member objects in vbscript

How can I loop around the member objects in a class and to identify the class for each object in vb script
for eg
class xyz consist of say 20 members object of different class and 3 of integer type, i need to have a function to be able to identify the number of members in xyz class which are object and to loop around each of this object to identify the class it belongs. Ignore whether the members are public or private.
xyz.a -> class type car
xyz.b -> class type book
xyz.c -> class type animal     etc

ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jefcheek
jefcheek

ASKER

How do I figure out the number of member objects in the class then ?
I don't believe you can in VBScript. There is no way to query the interface to determine what properties/methods/members it exposes. You would have to know when writing the code what the available members are called.
Can I ask why you need to do this in code at run time?
I am a newbie here....that's y i pose the question. if it can be done, jz say so...no need to insult. we all have our own specialties here
Which part of that do you think was insulting? All I did was ask why you needed to do this at runtime.
no comment