Can a Macro Run Another Macro

B

Bob

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.
 
J

JLGWhiz

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.
 
B

Bob

Thanks JLG - it works perfectly.
--
Bob


JLGWhiz said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top