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
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 <sg_b...@hotmail.com> wrote in message
news:ucqGC#ZaDHA...@tk2msftngp13.phx.gbl...
Regards and thanks.
Tom Ogilvy" <twog...@msn.com> wrote in message
news:uPS5WBaa...@TK2MSFTNGP12.phx.gbl...
--
Regards,
Tom Ogilvy
Stuart <sg_b...@hotmail.com> wrote in message
news:OcJNgLaa...@TK2MSFTNGP09.phx.gbl...
Thanks,
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" <NoJ...@Junk.com> wrote in message
news:010f01c369a8$65008160$a401...@phx.gbl...
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" <Rob_...@msn.com> wrote in message
news:%23XPR2ra...@TK2MSFTNGP12.phx.gbl...
RBS
"Myrna Larson" <myrna...@charter.net> wrote in message
news:d4ohkv83cpm4cn2b9...@4ax.com...
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" <bartsm...@blueyonder.co.uk> wrote in message
news:eVaRtIia...@tk2msftngp13.phx.gbl...
RBS
"Stuart" <sg_b...@hotmail.com> wrote in message
news:ucqGC%23ZaDH...@tk2msftngp13.phx.gbl...
I'm just reading "Excel 97 Secrets" (page 676) & they mention module
limits:-
"If you use many variables in one workbook, be aware that 64K is the maximum
size variables can occupy in a workbook. If you run into this limit, split
your workbook in two; this will double the amount of memory space available
for your variables.
You are likelier to encounter a limit of 4,000 lines of code per module.
Before you reach this limit, you will see an out-of-memory message. The
solution is obvious: Put your code in more than one module."
regards,
John
"Stuart" <sg_b...@hotmail.com> wrote in message
news:ucqGC#ZaDHA...@tk2msftngp13.phx.gbl...
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.