Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'll heve to be careful then. I do get carried away sometimes... -
Pikus --- Message posted from http://www.ExcelForum.com/ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HOW TO CARRY A VAIABLE RESULTS FROM EXCEL SHEET PROCEDURE TO A MODULE | Excel Discussion (Misc queries) | |||
to call procedure in a worksheet in a module | Excel Discussion (Misc queries) | |||
code in module A to not execute a Worksheet_SelectionChange sub of another module | Excel Discussion (Misc queries) | |||
Variable from a sheet module in a class module in XL XP | Excel Programming |