Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Lines in a Module(Procedure)

I sometimes get a message that my procedure is too long.
How many lines of code does a procedure hold?
Thanks for the reply in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Lines in a Module(Procedure)

How many lines are you dealing with? What is the exact message? Do you
know it verbatim? - Pikus


---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Lines in a Module(Procedure)

I don't know what the exact message was but I know I had
alot of lines because what I did was record a macro in
Excel. I had a spreadsheet that is around 4 Pages long
and when I looked at the code it was huge. When I ran the
macro it gave me the message so I broke down the code into
sub procedures until I did not get the message anymore. I
was just wondering if it said an exact number somewhere.
You should try this to see if you can come up with the
exact number. My rule of thumb is not to write a
procedure that is longer than a page or page and 1/2.
-----Original Message-----
How many lines are you dealing with? What is the exact

message? Do you
know it verbatim? - Pikus


---
Message posted from http://www.ExcelForum.com/

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Lines in a Module(Procedure)

I'll heve to be careful then. I do get carried away sometimes... -
Pikus


---
Message posted from http://www.ExcelForum.com/

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Lines in a Module(Procedure)

the rule of thumb around here is that procedures shouldn't be bigger than 64k
when you export it to a text file.

But that's just a rule of thumb. I don't think the actual limit is documented
anywhere.

Juan Melero wrote:

I sometimes get a message that my procedure is too long.
How many lines of code does a procedure hold?
Thanks for the reply in advance.


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Lines in a Module(Procedure)

"Dave Peterson" wrote...
the rule of thumb around here is that procedures shouldn't be bigger than 64k
when you export it to a text file.

But that's just a rule of thumb. I don't think the actual limit is documented
anywhere.

...

64KB in one module I can understand, but 64KB in one *procedure*? Even if lines
of code averaged 64 characters (including the ending newline sequence), that'd
be a 1024 line procedure, so spanning just a bit more than 17 60-line pages in
printout. A single prodedure of that size is a REALLY BAD IDEA!


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Lines in a Module(Procedure)

Oops. I meant Module!

Sorry about the error and thanks for the correction.



Harlan Grove wrote:

"Dave Peterson" wrote...
the rule of thumb around here is that procedures shouldn't be bigger than 64k
when you export it to a text file.

But that's just a rule of thumb. I don't think the actual limit is documented
anywhere.

..

64KB in one module I can understand, but 64KB in one *procedure*? Even if lines
of code averaged 64 characters (including the ending newline sequence), that'd
be a 1024 line procedure, so spanning just a bit more than 17 60-line pages in
printout. A single prodedure of that size is a REALLY BAD IDEA!


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW TO CARRY A VAIABLE RESULTS FROM EXCEL SHEET PROCEDURE TO A MODULE CAPTGNVR Excel Discussion (Misc queries) 5 February 2nd 07 07:05 PM
to call procedure in a worksheet in a module CAPTGNVR Excel Discussion (Misc queries) 4 January 30th 07 09:39 PM
code in module A to not execute a Worksheet_SelectionChange sub of another module Jack Sons Excel Discussion (Misc queries) 4 December 11th 05 11:52 PM
Variable from a sheet module in a class module in XL XP hglamy[_2_] Excel Programming 2 October 14th 03 05:48 PM


All times are GMT +1. The time now is 09:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"