ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Procedure Limit ?? (https://www.excelbanter.com/excel-programming/373431-procedure-limit.html)

RW

Procedure Limit ??
 
I seemed to have reached the Procedure limit in one of my sub routines. Is
this limited by characters, lines of code or what?
If I can move some of the code into new procedures and call the new
procedures from within the large procedure, it this a workaround?

Thanks

Tom Ogilvy

Procedure Limit ??
 
if you export the module and look at the resulting bas file size, if it
approachs 64K, then it is generally advised to make it smaller by using the
workarounds you describe.

--
Regards,
Tom Ogilvy


"RW" wrote:

I seemed to have reached the Procedure limit in one of my sub routines. Is
this limited by characters, lines of code or what?
If I can move some of the code into new procedures and call the new
procedures from within the large procedure, it this a workaround?

Thanks


RW

Procedure Limit ??
 
So, the Module can only be 64k. If mine is this large, then the new
procedures will need to be in another Module? Or did you mean each Sub can
only be 64K?

If I create new procedures in another module, can I make global variables in
module 1 that can be read in the new module. If so, how is this done?

Thanks

"Tom Ogilvy" wrote:

if you export the module and look at the resulting bas file size, if it
approachs 64K, then it is generally advised to make it smaller by using the
workarounds you describe.

--
Regards,
Tom Ogilvy


"RW" wrote:

I seemed to have reached the Procedure limit in one of my sub routines. Is
this limited by characters, lines of code or what?
If I can move some of the code into new procedures and call the new
procedures from within the large procedure, it this a workaround?

Thanks


Bob Phillips

Procedure Limit ??
 
Module. Just take some of the subs out of one and put them in a new module.
In general, keep them to a manageable size, better to have to many than too
large.

If you declare global variables in a module, that is Public before any
macros, they will be available to all modules.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RW" wrote in message
...
So, the Module can only be 64k. If mine is this large, then the new
procedures will need to be in another Module? Or did you mean each Sub can
only be 64K?

If I create new procedures in another module, can I make global variables

in
module 1 that can be read in the new module. If so, how is this done?

Thanks

"Tom Ogilvy" wrote:

if you export the module and look at the resulting bas file size, if it
approachs 64K, then it is generally advised to make it smaller by using

the
workarounds you describe.

--
Regards,
Tom Ogilvy


"RW" wrote:

I seemed to have reached the Procedure limit in one of my sub

routines. Is
this limited by characters, lines of code or what?
If I can move some of the code into new procedures and call the new
procedures from within the large procedure, it this a workaround?

Thanks




RW

Procedure Limit ??
 
OK, I can declare the varibles as Public. Thanks

"Bob Phillips" wrote:

Module. Just take some of the subs out of one and put them in a new module.
In general, keep them to a manageable size, better to have to many than too
large.

If you declare global variables in a module, that is Public before any
macros, they will be available to all modules.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RW" wrote in message
...
So, the Module can only be 64k. If mine is this large, then the new
procedures will need to be in another Module? Or did you mean each Sub can
only be 64K?

If I create new procedures in another module, can I make global variables

in
module 1 that can be read in the new module. If so, how is this done?

Thanks

"Tom Ogilvy" wrote:

if you export the module and look at the resulting bas file size, if it
approachs 64K, then it is generally advised to make it smaller by using

the
workarounds you describe.

--
Regards,
Tom Ogilvy


"RW" wrote:

I seemed to have reached the Procedure limit in one of my sub

routines. Is
this limited by characters, lines of code or what?
If I can move some of the code into new procedures and call the new
procedures from within the large procedure, it this a workaround?

Thanks






All times are GMT +1. The time now is 08:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com