Enumerate through a Class module function names. 
Author Message
 Enumerate through a Class module function names.

I have a class module that contains serveral functions thay I use callbyname
function to execute. I would like to build a listbox showing the name of all
the functions in that class module. Is there a way to get a list at runtime?

Thanks Mark



Sat, 31 Jul 2004 00:06:50 GMT  
 Enumerate through a Class module function names.
Here's one way... uses TLBINF32.DLL..

Enumerate Object Properties
http://www.vbsight.com/Code.htm

currently, the sample shows names of properties only... no types
--
Ken Halter
MS-MVP-VB
Please keep it in the groups..


Quote:
> I have a class module that contains serveral functions thay I use
callbyname
> function to execute. I would like to build a listbox showing the name of
all
> the functions in that class module. Is there a way to get a list at
runtime?

> Thanks Mark



Sat, 31 Jul 2004 01:12:55 GMT  
 Enumerate through a Class module function names.
Note that TLI will only work in the compiled EXE/DLL/OCX if the class is
public. There is no runtime type information available for private objects.
Of course, private objects don't tend to change much between when you
compile and run them, so it is easy enough to compile in a static set of
data. -Matt


Quote:
> Here's one way... uses TLBINF32.DLL..

> Enumerate Object Properties
> http://www.vbsight.com/Code.htm

> currently, the sample shows names of properties only... no types
> --
> Ken Halter
> MS-MVP-VB
> Please keep it in the groups..



> > I have a class module that contains serveral functions thay I use
> callbyname
> > function to execute. I would like to build a listbox showing the name of
> all
> > the functions in that class module. Is there a way to get a list at
> runtime?

> > Thanks Mark



Sun, 01 Aug 2004 07:30:52 GMT  
 Enumerate through a Class module function names.
Good point... and I'll add that comment to the sample. Probably should add
output to file or something to make it easy to get the list.

--
Ken Halter
MS-MVP-VB
Please keep it in the groups..


Quote:
> Note that TLI will only work in the compiled EXE/DLL/OCX if the class is
> public. There is no runtime type information available for private
objects.
> Of course, private objects don't tend to change much between when you
> compile and run them, so it is easy enough to compile in a static set of
> data. -Matt



> > Here's one way... uses TLBINF32.DLL..

> > Enumerate Object Properties
> > http://www.vbsight.com/Code.htm

> > currently, the sample shows names of properties only... no types
> > --
> > Ken Halter
> > MS-MVP-VB
> > Please keep it in the groups..



> > > I have a class module that contains serveral functions thay I use
> > callbyname
> > > function to execute. I would like to build a listbox showing the name
of
> > all
> > > the functions in that class module. Is there a way to get a list at
> > runtime?

> > > Thanks Mark



Sun, 01 Aug 2004 23:18:03 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Form, module, class and sub or function names at runtime

2. Returning the name of a module/class module

3. Retrieve name of current sub/function and name of current module

4. Class modules 97 - Refering to array within a custom class module

5. Accessing procedures of a class module from another class module

6. Binary compatibility, Public Class, Name conflicts with existing module, project, or object library

7. How to RE-NAME a class module???

8. Current class module and function

9. Calling a Function in an MS Access Class/Form/Module from an outside application

10. Running a class module function

11. Direct 3D functions modules/wrappers/classes etc

12. Functions vs Class module

 

 
Powered by phpBB® Forum Software