Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Module Limits

I do a lot of VB programming in the modules, which take data from a
spreadsheet, perform a calcualtion and write the answer back to the
spreadsheet. I have a lot of code in a number of modules. At a certain
point, when I add code to a module, it stops working. Moving the code to
another module ususally corrects the problem.

My question: Is there a limit on the number or size of each module?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Module Limits

There is no hard limit on the number of lines of code in a
module, but the compiled size of the code in the module must be
less than 64K. I tend to keep modules less than about 3K lines
of code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Richard Weatherly" <Richard
wrote in message
...
I do a lot of VB programming in the modules, which take data
from a
spreadsheet, perform a calcualtion and write the answer back to
the
spreadsheet. I have a lot of code in a number of modules. At
a certain
point, when I add code to a module, it stops working. Moving
the code to
another module ususally corrects the problem.

My question: Is there a limit on the number or size of each
module?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Module Limits

Thanks for the info, Chip.

How do you know how much the compiled size is?

"Chip Pearson" wrote:

There is no hard limit on the number of lines of code in a
module, but the compiled size of the code in the module must be
less than 64K. I tend to keep modules less than about 3K lines
of code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Richard Weatherly" <Richard
wrote in message
...
I do a lot of VB programming in the modules, which take data
from a
spreadsheet, perform a calcualtion and write the answer back to
the
spreadsheet. I have a lot of code in a number of modules. At
a certain
point, when I add code to a module, it stops working. Moving
the code to
another module ususally corrects the problem.

My question: Is there a limit on the number or size of each
module?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Module Limits

Unfortunately, there is no way to determine the size of a module,
other than number of lines of code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Richard Weatherly"
wrote in message
...
Thanks for the info, Chip.

How do you know how much the compiled size is?

"Chip Pearson" wrote:

There is no hard limit on the number of lines of code in a
module, but the compiled size of the code in the module must
be
less than 64K. I tend to keep modules less than about 3K
lines
of code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Richard Weatherly" <Richard

wrote in message
...
I do a lot of VB programming in the modules, which take data
from a
spreadsheet, perform a calcualtion and write the answer back
to
the
spreadsheet. I have a lot of code in a number of modules.
At
a certain
point, when I add code to a module, it stops working.
Moving
the code to
another module ususally corrects the problem.

My question: Is there a limit on the number or size of each
module?






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Module Limits

Chip,
Two ideas on module size that I have used - please advise if these are not
as effective as I had thought;
1. Export the module and view the file size using Windows Explorer
2. VBE Tools 2.0 Add-In from Office Automation (http://www.oaltd.co.uk ) has
a module size indicator in its toolbar.

Alex J


"Chip Pearson" wrote in message
...
Unfortunately, there is no way to determine the size of a module,
other than number of lines of code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Richard Weatherly"
wrote in message
...
Thanks for the info, Chip.

How do you know how much the compiled size is?

"Chip Pearson" wrote:

There is no hard limit on the number of lines of code in a
module, but the compiled size of the code in the module must
be
less than 64K. I tend to keep modules less than about 3K
lines
of code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Richard Weatherly" <Richard

wrote in message
...
I do a lot of VB programming in the modules, which take data
from a
spreadsheet, perform a calcualtion and write the answer back
to
the
spreadsheet. I have a lot of code in a number of modules.
At
a certain
point, when I add code to a module, it stops working.
Moving
the code to
another module ususally corrects the problem.

My question: Is there a limit on the number or size of each
module?









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Module Limits

You should also get Rob Bovey's VBA Code Cleaner at www.appspro.com

--
Robin Hammond
www.enhanceddatasystems.com


"Alex J" wrote in message
. ..
Chip,
Two ideas on module size that I have used - please advise if these are not
as effective as I had thought;
1. Export the module and view the file size using Windows Explorer
2. VBE Tools 2.0 Add-In from Office Automation (http://www.oaltd.co.uk )
has
a module size indicator in its toolbar.

Alex J


"Chip Pearson" wrote in message
...
Unfortunately, there is no way to determine the size of a module,
other than number of lines of code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Richard Weatherly"
wrote in message
...
Thanks for the info, Chip.

How do you know how much the compiled size is?

"Chip Pearson" wrote:

There is no hard limit on the number of lines of code in a
module, but the compiled size of the code in the module must
be
less than 64K. I tend to keep modules less than about 3K
lines
of code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Richard Weatherly" <Richard

wrote in message
...
I do a lot of VB programming in the modules, which take data
from a
spreadsheet, perform a calcualtion and write the answer back
to
the
spreadsheet. I have a lot of code in a number of modules.
At
a certain
point, when I add code to a module, it stops working.
Moving
the code to
another module ususally corrects the problem.

My question: Is there a limit on the number or size of each
module?









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
sum, ave with limits, help pls. Chris Excel Discussion (Misc queries) 6 November 3rd 08 12:53 PM
CLASS MODULE & SIMPLE MODULE FARAZ QURESHI Excel Discussion (Misc queries) 1 September 7th 07 09:32 AM
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
arrays - module to module mike Excel Programming 3 February 25th 04 08:56 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 07:44 PM.

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

About Us

"It's about Microsoft Excel"