RE: Too much coding for macro?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Just insert three modules, put the coding for B in one in a macro called
main_b, the coding for C in another called main_c and in the third something
like:

sub master()

'logical check to see if A applies
if ... then call main()

'logical check to see if B applies
if ... then call main_b()

'logical check to see if C applies
if ... then call main_c()

end sub

"Eric" wrote:

Does anyone have any suggestions on how to handle too much coding for macro?

Under the macro coding, the structure is shown below

Sub main()

A set of coding for A class
...
A set of coding for B class
...
A set of coding for C class
...

End Sub

When there is only coding for A class, there is no problem on running macro,
but when I insert the coding for B class, it pops up something like too much
coding for macro. Does anyone have any suggestions on how to split coding
into different module? so I still can run macro by referring to different
module.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric
.



Relevant Pages

  • Re: Suppress First Page Header
    ... Hi Jim, me again. ... inserted the coding you provided. ... The error is: Compile error: Sub or Function not defined. ... >> to the macro so the user can either use the print button or File, ...
    (microsoft.public.excel.programming)
  • Re: Stop all macros in worksheet when left
    ... However, if the count down is a recurrsive looping, he could have a boolean ... OOP based coding is more difficult to learn than procedure based coding (Not ... He includes notes on how to kill a pending macro. ...
    (microsoft.public.excel.programming)
  • Re: Mailmerge issue
    ... The problem could be caused by an error in your coding earlier on. ... What's the the code for rest of this sub? ... There is macro defined in one of the word document. ... under preferences and saw that microsoft word lib is checked. ...
    (microsoft.public.word.mailmerge.fields)
  • RE: How to run macro to shut down my PC?
    ... I would like to add coding only run TurnOffPC only after 4 pm ... Sub mycoding ... I have a list of code within macro to be run for 3 hours, ...
    (microsoft.public.excel.programming)
  • RE: VBA Code and Pivot Tables
    ... This is the coding I was using for this issue. ... ' Macro recorded 8/17/2009 by LAtchison ... "Primary Resource Full Name") ...
    (microsoft.public.excel.programming)