ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   all macros into one.. (https://www.excelbanter.com/excel-programming/288449-all-macros-into-one.html)

Portroe

all macros into one..
 
Hi

I have a number of small macros on a table. How can I include them into
obne large macr so that they all run at once,

thanks

portroe


Bob Phillips[_6_]

all macros into one..
 
Why not just have one new macro that calls them all one after the other?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Portroe" wrote in message
...
Hi

I have a number of small macros on a table. How can I include them into
obne large macr so that they all run at once,

thanks

portroe




pikus

all macros into one..
 
Put the code for the macros in to a module and be sure to rename them
and declare them as "Public" exe:

Public Sub NewSub1()
blah blahblah
End Sub

Public Sub NewSub2()
blah blahblah
End Sub

Public Sub NewSub3()
blah blahblah
End Sub

Then create one macro that calls each in turn:

Sub Macro1()
Call NewSub1
Call NewSub2
Call NewSub3
End Sub

- Pikus


---
Message posted from http://www.ExcelForum.com/


Portroe

all macros into one..
 
Thanks,

if they are in the same module do you need to declare them public?



pikus < wrote:
Put the code for the macros in to a module and be sure to rename them
and declare them as "Public" exe:

Public Sub NewSub1()
blah blahblah
End Sub

Public Sub NewSub2()
blah blahblah
End Sub

Public Sub NewSub3()
blah blahblah
End Sub

Then create one macro that calls each in turn:

Sub Macro1()
Call NewSub1
Call NewSub2
Call NewSub3
End Sub

- Pikus


---
Message posted from http://www.ExcelForum.com/




All times are GMT +1. The time now is 07:48 AM.

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