Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default 64kb limit to module code

Within the last day or so Rob Bovey replied to an OP
and included the comment that (sic) "a module should
not exceed 64kb" ( I think that's what was said).

Would someone be kind enough to explain the reasons
behind this advice, please?

Would this apply to all modules (Standard, Class etc),
and would this equally apply to AddIns?

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 64kb limit to module code

How does one check, just the size of the module? If it
excedes 64 k, then is the best way to export it, not to
export it, but to maybe put the code in a word document
then copy it out to a "newly" establised module in the
exported Excel file?

Thanks,
David
-----Original Message-----
The 64kb problem would apply to addins as well.

--
Regards,
Tom Ogilvy

Stuart wrote in message
...
Ok so if a project contains modules 64Kb and that
project is saved as an AddIn, then ok.
If an individual module greater than 64KB were to be
exported from that AddIn, then problems.

Regards and thanks.

Tom Ogilvy" wrote in message
...
What is there to explain? If you export a module as

a file, then look
at
the file size, it if it greater than 64KB, then,

based on Rob's
experience
and that of others, one may experience strange

problems with the
application.

Since this is not a documented restriction, it would

be hard to
definitively
say what the exact restrictions are, but I would

suggest that as a rule
of
thumb, regardless of the type of module, keep the

size to less than 64
KB.

--
Regards,
Tom Ogilvy


Stuart wrote in message
...
Within the last day or so Rob Bovey replied to an

OP
and included the comment that (sic) "a module

should
not exceed 64kb" ( I think that's what was said).

Would someone be kind enough to explain the reasons
behind this advice, please?

Would this apply to all modules (Standard, Class

etc),
and would this equally apply to AddIns?

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system

(http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release

Date: 19/08/2003






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system

(http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date:

19/08/2003




.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default 64kb limit to module code

Hi David,

The easiest way to check one module is to export it and then look at the
file size of the exported module in Explorer. If the module is too large,
add a new module to your Excel project and move code from the module that is
too large into the new module until the module that was too large falls
below 64KB.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"David" wrote in message
...
How does one check, just the size of the module? If it
excedes 64 k, then is the best way to export it, not to
export it, but to maybe put the code in a word document
then copy it out to a "newly" establised module in the
exported Excel file?

Thanks,
David
-----Original Message-----
The 64kb problem would apply to addins as well.

--
Regards,
Tom Ogilvy

Stuart wrote in message
...
Ok so if a project contains modules 64Kb and that
project is saved as an AddIn, then ok.
If an individual module greater than 64KB were to be
exported from that AddIn, then problems.

Regards and thanks.

Tom Ogilvy" wrote in message
...
What is there to explain? If you export a module as

a file, then look
at
the file size, it if it greater than 64KB, then,

based on Rob's
experience
and that of others, one may experience strange

problems with the
application.

Since this is not a documented restriction, it would

be hard to
definitively
say what the exact restrictions are, but I would

suggest that as a rule
of
thumb, regardless of the type of module, keep the

size to less than 64
KB.

--
Regards,
Tom Ogilvy


Stuart wrote in message
...
Within the last day or so Rob Bovey replied to an

OP
and included the comment that (sic) "a module

should
not exceed 64kb" ( I think that's what was said).

Would someone be kind enough to explain the reasons
behind this advice, please?

Would this apply to all modules (Standard, Class

etc),
and would this equally apply to AddIns?

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system

(http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release

Date: 19/08/2003






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system

(http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date:

19/08/2003




.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default 64kb limit to module code

Rob,

This is interesting.
I just exported a module from an add-in and the module size is 450 Kb.
This is the file Module1.bas is 450Kb.
Now this is an add-in and sofar I haven't found any problems yet.
It would be a nuisance to split this module in 8.
What kind of problems could one have and are there particular situations
where they are more likely to happen?
Thanks for any advice.

RBS


"Rob Bovey" wrote in message
...
Hi David,

The easiest way to check one module is to export it and then look at

the
file size of the exported module in Explorer. If the module is too large,
add a new module to your Excel project and move code from the module that

is
too large into the new module until the module that was too large falls
below 64KB.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"David" wrote in message
...
How does one check, just the size of the module? If it
excedes 64 k, then is the best way to export it, not to
export it, but to maybe put the code in a word document
then copy it out to a "newly" establised module in the
exported Excel file?

Thanks,
David
-----Original Message-----
The 64kb problem would apply to addins as well.

--
Regards,
Tom Ogilvy

Stuart wrote in message
...
Ok so if a project contains modules 64Kb and that
project is saved as an AddIn, then ok.
If an individual module greater than 64KB were to be
exported from that AddIn, then problems.

Regards and thanks.

Tom Ogilvy" wrote in message
...
What is there to explain? If you export a module as

a file, then look
at
the file size, it if it greater than 64KB, then,

based on Rob's
experience
and that of others, one may experience strange

problems with the
application.

Since this is not a documented restriction, it would

be hard to
definitively
say what the exact restrictions are, but I would

suggest that as a rule
of
thumb, regardless of the type of module, keep the

size to less than 64
KB.

--
Regards,
Tom Ogilvy


Stuart wrote in message
...
Within the last day or so Rob Bovey replied to an

OP
and included the comment that (sic) "a module

should
not exceed 64kb" ( I think that's what was said).

Would someone be kind enough to explain the reasons
behind this advice, please?

Would this apply to all modules (Standard, Class

etc),
and would this equally apply to AddIns?

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system

(http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release

Date: 19/08/2003






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system

(http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date:

19/08/2003




.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default 64kb limit to module code


To add to Myrna's response, 64KB is not some kind of absolute limit. In
fact I don't even know where that particular size originated. Lacking any
guidance from MS, and faced with an obvious problem, it may simply have been
empirically determined by the Excel development community that size-related
problems stopped once modules were smaller than this.

It's very rare to see immediate problems upon exceeding the 64KB size
limit. The problems tend to appear over time and manifest themselves as
strange logical or structural errors in your code for which no obvious cause
can be found.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"RB Smissaert" wrote in message
...
Rob,

This is interesting.
I just exported a module from an add-in and the module size is 450 Kb.
This is the file Module1.bas is 450Kb.
Now this is an add-in and sofar I haven't found any problems yet.
It would be a nuisance to split this module in 8.
What kind of problems could one have and are there particular situations
where they are more likely to happen?
Thanks for any advice.

RBS


"Rob Bovey" wrote in message
...
Hi David,

The easiest way to check one module is to export it and then look at

the
file size of the exported module in Explorer. If the module is too

large,
add a new module to your Excel project and move code from the module

that
is
too large into the new module until the module that was too large falls
below 64KB.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"David" wrote in message
...
How does one check, just the size of the module? If it
excedes 64 k, then is the best way to export it, not to
export it, but to maybe put the code in a word document
then copy it out to a "newly" establised module in the
exported Excel file?

Thanks,
David
-----Original Message-----
The 64kb problem would apply to addins as well.

--
Regards,
Tom Ogilvy

Stuart wrote in message
...
Ok so if a project contains modules 64Kb and that
project is saved as an AddIn, then ok.
If an individual module greater than 64KB were to be
exported from that AddIn, then problems.

Regards and thanks.

Tom Ogilvy" wrote in message
...
What is there to explain? If you export a module as
a file, then look
at
the file size, it if it greater than 64KB, then,
based on Rob's
experience
and that of others, one may experience strange
problems with the
application.

Since this is not a documented restriction, it would
be hard to
definitively
say what the exact restrictions are, but I would
suggest that as a rule
of
thumb, regardless of the type of module, keep the
size to less than 64
KB.

--
Regards,
Tom Ogilvy


Stuart wrote in message
...
Within the last day or so Rob Bovey replied to an
OP
and included the comment that (sic) "a module
should
not exceed 64kb" ( I think that's what was said).

Would someone be kind enough to explain the reasons
behind this advice, please?

Would this apply to all modules (Standard, Class
etc),
and would this equally apply to AddIns?

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system
(http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release
Date: 19/08/2003






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system
(http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date:
19/08/2003




.








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default 64kb limit to module code

Does the same apply to Userforms?
Just exported one and the .frm file is 90 Kb and the .frx file is 80 Kb.
It does actually sometimes show minor abberations, but sofar nothing major
to worry about.

RBS


"Stuart" wrote in message
...
Within the last day or so Rob Bovey replied to an OP
and included the comment that (sic) "a module should
not exceed 64kb" ( I think that's what was said).

Would someone be kind enough to explain the reasons
behind this advice, please?

Would this apply to all modules (Standard, Class etc),
and would this equally apply to AddIns?

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default 64kb limit to module code

"RB Smissaert" wrote in message
...
Does the same apply to Userforms?
Just exported one and the .frm file is 90 Kb and the .frx file is 80 Kb.
It does actually sometimes show minor abberations, but sofar nothing major
to worry about.


That's a very good question. UserForms didn't even exist when this
problem first appeared, so I don't know if they are handled differently from
standard modules or not. I keep my own UserForm code within the 64KB limit
out of habit, so I haven't had the opportunity to test the size limit with
them. Based on postings here, having too many controls on a UserForm seems
to be a much more common problem then having to much code in them.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


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
code module? Kat Excel Worksheet Functions 2 January 10th 09 03:10 AM
code won't run from a module Geoff Excel Discussion (Misc queries) 3 February 20th 07 08:08 PM
Unprotect Code Module in Code Damien Excel Discussion (Misc queries) 2 April 18th 06 03:10 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
copying vba code to a standard code module 1vagrowr Excel Discussion (Misc queries) 2 November 23rd 05 04:00 PM


All times are GMT +1. The time now is 05:44 PM.

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"