Calling a sub method

  • Thread starter Thread starter richcoleuk
  • Start date Start date
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?
 
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
 
because the name of the sub method is specified on the worksheet, and
this value is taken from the sheet.
 
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

Similar Threads

Run Macro If Cell have "x" value 0
Calling a sub 3
Call a Private Sub using a variable 3
Simple Variable to someone 5
Class Module Method 2
Type mismatch 1
Can't call a subroutine 3
Call module 2

Back
Top