close

Hi,

I have recorded a number of macros in a worksheet,
How can i combine these macros together, instead of running each macro
i want to just run one macro.
It was too big of a job to record one big macro.

Thanks--
andy_
------------------------------------------------------------------------
andy_'s Profile: www.excelforum.com/member.php...oamp;userid=32218
View this thread: www.excelforum.com/showthread...hreadid=519702Create a new procedure in any of the existing modules you may have in your
work book and just list the names of the macros you wish to run, in the order
that they are to be run in.

Sub RunEmAll()

MacroName1
MacroName2
MacroName3

End Sub

Then run your new procedure to execute them all.
--
Kevin Backmannquot;andy_quot; wrote:

gt;
gt; Hi,
gt;
gt; I have recorded a number of macros in a worksheet,
gt; How can i combine these macros together, instead of running each macro
gt; i want to just run one macro.
gt; It was too big of a job to record one big macro.
gt;
gt; Thanks
gt;
gt;
gt; --
gt; andy_
gt; ------------------------------------------------------------------------
gt; andy_'s Profile: www.excelforum.com/member.php...oamp;userid=32218
gt; View this thread: www.excelforum.com/showthread...hreadid=519702
gt;
gt;


Ok, now i have just lost my macros, It said something about
personal.xls needs to be open in the startup, but cant find it.....--
andy_
------------------------------------------------------------------------
andy_'s Profile: www.excelforum.com/member.php...oamp;userid=32218
View this thread: www.excelforum.com/showthread...hreadid=519702On Tue, 7 Mar 2006 05:40:30 -0800, Kevin B
gt; wrote:

gt;Create a new procedure in any of the existing modules you may have in your
gt;work book and just list the names of the macros you wish to run, in the order
gt;that they are to be run in.
gt;
gt;Sub RunEmAll()
gt;
gt; MacroName1
gt; MacroName2
gt; MacroName3
gt;
gt;End Sub
gt;
gt;Then run your new procedure to execute them all.

How do you refer to macros in a different module and or .xls file

--

Steve

referring to a macro in a different module is not normally a problem although
it is possible to have a macro with the same name in two different modules and
refer to the specific macro -- not recommended.

To refer to a macro in another workbook, see
www.mvps.org/dmcritchie/excel...ll.htm#another
that also shows how to be specify a module

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: www.mvps.org/dmcritchie/excel/excel.htm
Search Page: www.mvps.org/dmcritchie/excel/search.htm

quot;Steve Waltonquot; gt; wrote in message ...
gt; On Tue, 7 Mar 2006 05:40:30 -0800, Kevin B
gt; gt; wrote:
gt;
gt; gt;Create a new procedure in any of the existing modules you may have in your
gt; gt;work book and just list the names of the macros you wish to run, in the order
gt; gt;that they are to be run in.
gt; gt;
gt; gt;Sub RunEmAll()
gt; gt;
gt; gt; MacroName1
gt; gt; MacroName2
gt; gt; MacroName3
gt; gt;
gt; gt;End Sub
gt; gt;
gt; gt;Then run your new procedure to execute them all.
gt;
gt; How do you refer to macros in a different module and or .xls file
gt;
gt; --
gt;
gt; Steve

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()