Hi,
I have a macro which will not run because it is to large. How do I split the
macro into two macros so that after the first macro the second automatically
runs. Could you please help me with the code. My macros are simply named
Macro 1 and Macro 2.
Thank you
Tony Jollans - 21 Jan 2008 12:45 GMT
If you don't know enough to do this on your own, I presume you have
relatively simple, if long, and probably recorded, macros so there shouldn't
be any major issues, and this may work ...
Sub Macro1
' Do a lot of stuff
Macro2
End Sub
Sub Macro2
' do a lot more stuff
End Sub
Clearly this is simplistic, and if you do have complex code, copied from
elsewhere perhaps, there may be many things to consider and a more
comprehensive examination of the code will be needed to break it into
logical, independent, parts.

Signature
Enjoy,
Tony
> Hi,
>
[quoted text clipped - 6 lines]
>
> Thank you
fumei - 21 Jan 2008 18:51 GMT
"I have a macro which will not run because it is to large."
How, exactly, do you know this? Are you getting an error message? If so,
what message?
>Hi,
>
[quoted text clipped - 4 lines]
>
>Thank you
Tony Jollans - 21 Jan 2008 19:08 GMT
Hi Gerry,
64K is the maximum size, above which you get a compile error: procedure too
large - unusual for its clarity.

Signature
Enjoy,
Tony
> "I have a macro which will not run because it is to large."
>
[quoted text clipped - 11 lines]
>>
>>Thank you