Too much coding for macro?

E

Eric

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
 
S

Sam Wilson

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
 
B

Barb Reinhardt

Alternatively, is it possible that you could use some of the same coding for
B class and C class that you use for A class?

You may want to post your code to see if you can get any assistance in
streamlining it. If you've recorded most of it, you can probably do a lot
of streamlining.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top