Calling a sub method

R

richcoleuk

Hi,

I have the name of my sub method stored in a variable:

mySubMethodName = "do_something"

I then want to call this method using the variable, I have tried
the following but it doesn't work:

Call mySubMethodName

Is there anyway to do what I am trying to do?
 
C

Christian

richcoleuk said:
Hi,

I have the name of my sub method stored in a variable:

mySubMethodName = "do_something"

I then want to call this method using the variable, I have tried
the following but it doesn't work:

Call mySubMethodName

Is there anyway to do what I am trying to do?


Why don't you just use

Call do_something

Christian
 
R

richcoleuk

because the name of the sub method is specified on the worksheet, and
this value is taken from the sheet.
 
B

Bob Phillips

Application.Run variable_name

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

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