Call a procedure whose name is stored in a variable

A

Andrew

Hi all

Is there a way of calling a procedure, the name of which is stored in
a variable?

I am trying to create a class object to encapsulate a timer function.
The idea is that you would instantiate the object and set a property
which determines which procedure to call. Evidently, this property let
procedure will use a private string variable to store the information,
and so at some point I'll need to have code along the lines of

Call [strProcedureName]

However, I can't get this to work.... any ideas?

Thanks a lot

Andrew
 
A

Andrew

Hello Andrew
How about:
Application.Run strProcedureName

HTH
Cordially
Pascal

"Andrew" <[email protected]> a écrit dans le message de (e-mail address removed)...


Is there a way of calling a procedure, the name of which is stored in
a variable?
I am trying to create a class object to encapsulate a timer function.
The idea is that you would instantiate the object and set a property
which determines which procedure to call. Evidently, this property let
procedure will use a private string variable to store the information,
and so at some point I'll need to have code along the lines of
Call [strProcedureName]
However, I can't get this to work.... any ideas?
Thanks a lot
Andrew- Hide quoted text -

- Show quoted text -

Hi

Thanks for that. This certainly works so thanks for that. I've another
question, regarding calling a proc from Application.OnTime, but it's
not really related so I'll do a separate post.

Thanks again

Andrew
 

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