ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   number of module limts (https://www.excelbanter.com/excel-programming/341888-number-module-limts.html)

Christy

number of module limts
 
I have discovered there is a limit to the number of lines you can have in a
procedure.

Is there a limit to the number of modules you can have in a workbook?
Is there a limit to the number of procedures/lines in a module?

Thanks
Christy ;)

Simon Murphy

number of module limts
 
Christy
Whats the proc line limit?
The biggest I've seen was 1600 - totally untestable and un-maintainable. 40
lines per proc is more realistic.
I don't think there is a number of modules limit, but I think the max size
is around 64kb when saved as text (May vary by version)
What are you building???

cheers
Simon

"Christy" wrote in message
...
I have discovered there is a limit to the number of lines you can have in a
procedure.

Is there a limit to the number of modules you can have in a workbook?
Is there a limit to the number of procedures/lines in a module?

Thanks
Christy ;)




Christy

number of module limts
 
Hi Simon,

Thanks for the reply!

I am building a summary sheet for a co-worker to get data from 84 (and
growing)other workbooks everyweek. Data from each workbook goes in a column
in the summary workbook.

This may not have been the best plan but here is what I am doing:

The 84 other spreadsheets are saved from email to a folder where this
summary sheet is stored. The Summary workbook gets the data via links (495
links for each). I am putting the formulas for the links in the cells via
code because it is easier.

I was planning to have a modue for each of the 84 other workbooks but with
an easy replace of 2 items, the code can be modified for the next workbook.
Maybe I can walk the user through the steps to modify and run the code to get
the formulas set up for each column needed.

Christy ;)



"Simon Murphy" wrote:

Christy
Whats the proc line limit?
The biggest I've seen was 1600 - totally untestable and un-maintainable. 40
lines per proc is more realistic.
I don't think there is a number of modules limit, but I think the max size
is around 64kb when saved as text (May vary by version)
What are you building???

cheers
Simon

"Christy" wrote in message
...
I have discovered there is a limit to the number of lines you can have in a
procedure.

Is there a limit to the number of modules you can have in a workbook?
Is there a limit to the number of procedures/lines in a module?

Thanks
Christy ;)





Simon Murphy

number of module limts
 
Christy
There are indeed other ways to do this. but on the basis that you are well
on with this approach here are a couple of ideas:
1. make the source workbook names consistent then you can do edit update
links (in code in a loop for all of them)
2. links update a lot faster when the source file is open
3.If you create a new folder each week and the source files have the same
name you can just open then summary and update links
4. you can do an edit replace on the formulas to change workbook names if
the edit links approach doesn't work.
5. have decent error handling for missing files, this procedure is going to
take a good few minutes
6. you should only really need 1 update routine I think and pass in the
source workbook name
7. If you hardcode all the file names in as the macro recorder does there
will be errors most weeks (probably)
8. a table driven approach works well when the files to process changes
regularly.

have fun
cheers
Simon

"Christy" wrote in message
...
Hi Simon,

Thanks for the reply!

I am building a summary sheet for a co-worker to get data from 84 (and
growing)other workbooks everyweek. Data from each workbook goes in a
column
in the summary workbook.

This may not have been the best plan but here is what I am doing:

The 84 other spreadsheets are saved from email to a folder where this
summary sheet is stored. The Summary workbook gets the data via links (495
links for each). I am putting the formulas for the links in the cells via
code because it is easier.

I was planning to have a modue for each of the 84 other workbooks but with
an easy replace of 2 items, the code can be modified for the next
workbook.
Maybe I can walk the user through the steps to modify and run the code to
get
the formulas set up for each column needed.

Christy ;)



"Simon Murphy" wrote:

Christy
Whats the proc line limit?
The biggest I've seen was 1600 - totally untestable and un-maintainable.
40
lines per proc is more realistic.
I don't think there is a number of modules limit, but I think the max
size
is around 64kb when saved as text (May vary by version)
What are you building???

cheers
Simon

"Christy" wrote in message
...
I have discovered there is a limit to the number of lines you can have
in a
procedure.

Is there a limit to the number of modules you can have in a workbook?
Is there a limit to the number of procedures/lines in a module?

Thanks
Christy ;)








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

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