ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can a Macro Run Another Macro (https://www.excelbanter.com/excel-programming/407898-can-macro-run-another-macro.html)

Bob

Can a Macro Run Another Macro
 
I would like to know if a Macro can run another Macro - sort of a "Master
Macro".
The 5 macro's I have now are titled "CopyCell1", "CopyCell2", "CopyCell3,
"CopyCell4 and "DeleteRowifZeroInA.
Is it possible to develop one that will run all?

Thanks.

--
Bob

Gary''s Student

Can a Macro Run Another Macro
 
sub hello()
Call qwerty
End Sub
--
Gary''s Student - gsnu200774

JLGWhiz

Can a Macro Run Another Macro
 
If all of you macros are in the same module in the same workbook then you can
run them from a master macro like this:

Sub MaterMacro()
CopyCell1
CopyCell2
CopyCell3
CopyCell4
DeleteRowIfZeroInA
End Sub

If you have them in different modules you will need to
specify the location like Sheet1!CopyCell2.


"Bob" wrote:

I would like to know if a Macro can run another Macro - sort of a "Master
Macro".
The 5 macro's I have now are titled "CopyCell1", "CopyCell2", "CopyCell3,
"CopyCell4 and "DeleteRowifZeroInA.
Is it possible to develop one that will run all?

Thanks.

--
Bob



All times are GMT +1. The time now is 09:29 PM.

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