ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   procedure too large (https://www.excelbanter.com/excel-programming/273832-procedure-too-large.html)

Ad van Zutphen

procedure too large
 
I got following message after compiling in Excel97:

Procedure too large

64K seems to be the limit. Is there a way to bypass this,
without breaking up the macro?

Regards,

Ad

libby

procedure too large
 
Yes 64K is the limit for a procedure.
You could try using more variables or splitting your code
into smaller procedures and calling them from each other

-----Original Message-----
I got following message after compiling in Excel97:

Procedure too large

64K seems to be the limit. Is there a way to bypass this,
without breaking up the macro?

Regards,

Ad
.


Richard Choate

procedure too large
 
I had to break mine up. So do you. Misery loves company, and I really was
miserable when I had to break up that code. Sorry.
--
HTH
Richard Choate, CPA

"Ad van Zutphen" wrote in message
...
I got following message after compiling in Excel97:

Procedure too large

64K seems to be the limit. Is there a way to bypass this,
without breaking up the macro?

Regards,

Ad



Myrna Larson[_2_]

procedure too large
 
FWIW, the "pros" say that a single procedure should fit entirely on one screen, i.e. no more
than about 20 lines.

On Thu, 7 Aug 2003 09:34:56 -0700, "Ad van Zutphen" wrote:

I got following message after compiling in Excel97:

Procedure too large

64K seems to be the limit. Is there a way to bypass this,
without breaking up the macro?

Regards,

Ad



Richard Choate

procedure too large
 
I don't think I could really agree with that. 20 lines is extremely short. I
try to have logical organization of code and I use lots of appropriately
named modules, too, but just try not to have so much you have to do a bunch
of scrolling. Also keep your lines short. Use lots of line breaks and good
comments.
--
HTH
Richard Choate, CPA

"Myrna Larson" wrote in message
...
FWIW, the "pros" say that a single procedure should fit entirely on one
screen, i.e. no more
than about 20 lines.

On Thu, 7 Aug 2003 09:34:56 -0700, "Ad van Zutphen"
wrote:

I got following message after compiling in Excel97:

Procedure too large

64K seems to be the limit. Is there a way to bypass this,
without breaking up the macro?

Regards,

Ad




Bob Kilmer

procedure too large
 
I have heard the "screens worth of code per routine" thing too. It is a
rule-of-thumb - a good one, I think - to suggest when to re-examine the code
you are writing for modularity and cohesiveness. Personally, I find it falls
out of what I find works anyway, but I don't let a rule-of-thumb stand in
the way of good reason to do otherwise.

--
Bob Kilmer


"Richard Choate" wrote in message
...
I don't think I could really agree with that. 20 lines is extremely short.

I
try to have logical organization of code and I use lots of appropriately
named modules, too, but just try not to have so much you have to do a

bunch
of scrolling. Also keep your lines short. Use lots of line breaks and good
comments.
--
HTH
Richard Choate, CPA

"Myrna Larson" wrote in message
...
FWIW, the "pros" say that a single procedure should fit entirely on one
screen, i.e. no more
than about 20 lines.

On Thu, 7 Aug 2003 09:34:56 -0700, "Ad van Zutphen"


wrote:

I got following message after compiling in Excel97:

Procedure too large

64K seems to be the limit. Is there a way to bypass this,
without breaking up the macro?

Regards,

Ad






Myrna Larson[_2_]

procedure too large
 
I agree with you on this one. If I have a procedure that fits on one screen, it usually just
calls other routines, never does "the work" itself.

"Richard Choate" wrote in message
...
I don't think I could really agree with that. 20 lines is extremely short.

I
try to have logical organization of code and I use lots of appropriately
named modules, too, but just try not to have so much you have to do a

bunch
of scrolling. Also keep your lines short. Use lots of line breaks and good
comments.
--
HTH
Richard Choate, CPA



All times are GMT +1. The time now is 04:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com