Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Procedure too large
Hi Group,
I am getting a message, "Procedure too large", there is a limit on the amount of code that be be executed? This means I have to eliminate some of the code? Thanks, David |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Procedure too large
Hello
See http://www.mrexcel.com/archive2/63500/73583.htm -- Wigi http://www.wimgielis.be = Excel/VBA, soccer and music "David" wrote: Hi Group, I am getting a message, "Procedure too large", there is a limit on the amount of code that be be executed? This means I have to eliminate some of the code? Thanks, David |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Procedure too large
If you are getting a message that a procedure is too large for the compiler,
then your procedure is *definitely* too large by any other measure. There is a limit imposed by the compiler, but well-written code should never approach that limit. You don't have to "eliminate" any code, but you need to move code out that procedure and put it into a procedure that is called by the main procedure. E.g., instead of Sub AAA() ' do lots of stuff for task #1 ' do lots of stuff for task #2 ' do lots of stuff for task #3 End Sub use structured code like Sub AAA() CallToOtherProcForTask1 CallToOtherProcForTask2 CallToOtherProcForTask3 End Sub Sub CallToOtherProcForTask1 ' code for task 1 End Sub Sub CallToOtherProcForTask2 ' code for task 2 End Sub Sub CallToOtherProcForTask3 ' code for task 3 End Sub -- Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) "David" wrote in message ... Hi Group, I am getting a message, "Procedure too large", there is a limit on the amount of code that be be executed? This means I have to eliminate some of the code? Thanks, David |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Procedure too large
Thanks Chip. I did a lookup on "Procedure too large" and this is what the
partners in crime suggested also. And it works great. "Chip Pearson" wrote: If you are getting a message that a procedure is too large for the compiler, then your procedure is *definitely* too large by any other measure. There is a limit imposed by the compiler, but well-written code should never approach that limit. You don't have to "eliminate" any code, but you need to move code out that procedure and put it into a procedure that is called by the main procedure. E.g., instead of Sub AAA() ' do lots of stuff for task #1 ' do lots of stuff for task #2 ' do lots of stuff for task #3 End Sub use structured code like Sub AAA() CallToOtherProcForTask1 CallToOtherProcForTask2 CallToOtherProcForTask3 End Sub Sub CallToOtherProcForTask1 ' code for task 1 End Sub Sub CallToOtherProcForTask2 ' code for task 2 End Sub Sub CallToOtherProcForTask3 ' code for task 3 End Sub -- Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) "David" wrote in message ... Hi Group, I am getting a message, "Procedure too large", there is a limit on the amount of code that be be executed? This means I have to eliminate some of the code? Thanks, David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Procedure too large | Excel Programming | |||
procedure too large | Excel Programming | |||
Procedure Too Large | Excel Programming | |||
Procedure too large | Excel Programming | |||
procedure too large | Excel Programming |