ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Calling a Macro within a Macro (https://www.excelbanter.com/excel-programming/383352-calling-macro-within-macro.html)

William[_9_]

Calling a Macro within a Macro
 
I recently received 2 excellant VBA macros from this group. I want to
select one of these macros to run within an existing macro. How do I
merge or integrate a macro into existing code?
Help will be greatly appreciated. Wm


merjet

Calling a Macro within a Macro
 
On Feb 15, 3:08 pm, "William" wrote:
I recently received 2 excellant VBA macros from this group. I want to
select one of these macros to run within an existing macro. How do I
merge or integrate a macro into existing code?
Help will be greatly appreciated. Wm




merjet

Calling a Macro within a Macro
 
Call Macro1 from Macro2 as follows:

Sub Macro2()
'optional code
Macro1
'optional code
End Sub

Hth,
Merjet




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

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