Using one macro to run another

excelmacro

Board Regular
Joined
Apr 8, 2002
Messages
50
I know this has been mentioned other times, but I can't find it by searching. What VB code do I put in to run one macro with another macro?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
One of three ways:

To run myMcr

put one of the following lines of code in your macro

myMcr

call myMcr

application.run("myMcr")


Hope this helps.

_________________
Cheers,<font size=+2><font color="red"> Nate<font color="blue">O</font></font></font>
"Me no are no nice guy."
This message was edited by NateO on 2002-04-25 12:39
 
Upvote 0
I am trying to run a macro in a module from a form macro, but the form macro says it can't find the module macro. any reason why? Do I have to put all my macros into the form?
 
Upvote 0
You should be able to run it with:

Code:
Application.Run ("myMcr")
Double check the spelling [of your macro] perhaps. If not respond accordingly we can add the module name, etc...

_________________
Cheers,<font size=+2><font color="red"> Nate<font color="blue">O</font></font></font>
This message was edited by NateO on 2002-04-25 16:25
 
Upvote 0
Application.Run ("Cancel_Click")
-the macro associated with this item says it can't find the macro Cancel_Click (runt time error 1004)


Private Sub Cancel_Click()
End
End Sub
-here is the macro cancel click
 
Upvote 0

Forum statistics

Threads
1,213,487
Messages
6,113,941
Members
448,534
Latest member
benefuexx

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top