Calling other macros

Temporary-Failure

Board Regular
Joined
Jul 16, 2010
Messages
140
I have sheet named as "Tilaustiedot". It has button and there's macro Public Sub CommandButton1_Click() attached to it.

How I can run macro "other_macro" which is in the LASKU-sheet?

Just writing Call other_macro into Public Sub CommandButton1_Click() macro doesn't work. There comes error: Compile error:
Sub or function not defined.

How I can call macro from other sheet?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
If you move the other macro to a normal module rather than a sheet's code module, the Call command should work.
 
Upvote 0

Forum statistics

Threads
1,214,927
Messages
6,122,309
Members
449,080
Latest member
jmsotelo

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