ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Linking macros (https://www.excelbanter.com/excel-worksheet-functions/214171-linking-macros.html)

out of my depth

Linking macros
 
This is going to sound v.basic but is there a simple way to run a few macros
on the same shortcut key?

If not is there a simple way to link seperate bits of code.

Thanks very much!
T

Luke M

Linking macros
 
Within the one macro you call, use

Application.Run "WorkbookName.xls'!MacroName"

And repeat as needed for each macro you want to run.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"out of my depth" wrote:

This is going to sound v.basic but is there a simple way to run a few macros
on the same shortcut key?

If not is there a simple way to link seperate bits of code.

Thanks very much!
T


Dave Peterson

Linking macros
 
You can just call other routines:

Option Explicit
Sub RunThemAll()
call runthefirst
call runthesecond
call runthethird
End sub



out of my depth wrote:

This is going to sound v.basic but is there a simple way to run a few macros
on the same shortcut key?

If not is there a simple way to link seperate bits of code.

Thanks very much!
T


--

Dave Peterson

out of my depth

Linking macros
 
Great, very easy and worked a treat. Cheers!

"Dave Peterson" wrote:

You can just call other routines:

Option Explicit
Sub RunThemAll()
call runthefirst
call runthesecond
call runthethird
End sub



out of my depth wrote:

This is going to sound v.basic but is there a simple way to run a few macros
on the same shortcut key?

If not is there a simple way to link seperate bits of code.

Thanks very much!
T


--

Dave Peterson



All times are GMT +1. The time now is 07:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com