ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro calling another Macro (https://www.excelbanter.com/excel-discussion-misc-queries/12355-macro-calling-another-macro.html)

spartanmba

Macro calling another Macro
 
Is it possible to call one macro within another macro? If so, how? The
macros would be located in the same workbook, but different sheets


Thanks,
John

Ken Wright

Sub Macro1()
Do stuff here maybe

Call Macro2()

Perhaps do more stuff here.
End sub

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"spartanmba" wrote in message
...
Is it possible to call one macro within another macro? If so, how? The
macros would be located in the same workbook, but different sheets


Thanks,
John




Ken Wright

Oops:-

Sub Macro1()
Do stuff here maybe

Call Macro2

Perhaps do more stuff here.
End sub

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Ken Wright" wrote in message
...
Sub Macro1()
Do stuff here maybe

Call Macro2()

Perhaps do more stuff here.
End sub

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

--------------------------------------------------------------------------

--
It's easier to beg forgiveness than ask permission :-)
--------------------------------------------------------------------------

--

"spartanmba" wrote in message
...
Is it possible to call one macro within another macro? If so, how? The
macros would be located in the same workbook, but different sheets


Thanks,
John







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

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