ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   General Question about Moduals (https://www.excelbanter.com/excel-discussion-misc-queries/92336-general-question-about-moduals.html)

JOUIOUI

General Question about Moduals
 
I'm putting all my Macros in one modual for a series of 4 reports, should
these be in 4 separate moduals, is there any danger of putting them all in
one? So far I have about 10 pages of code if I copy it into a word doc.
Thanks for your help.

FSt1

General Question about Moduals
 
hi,
they should be in seperate modules. you can put them in 1 module but this
could cause memory problems and other memory related problems ie run slow,
stalling ect.

regards
FSt1

"JOUIOUI" wrote:

I'm putting all my Macros in one modual for a series of 4 reports, should
these be in 4 separate moduals, is there any danger of putting them all in
one? So far I have about 10 pages of code if I copy it into a word doc.
Thanks for your help.


Bob Phillips

General Question about Moduals
 
Absolutely not true!

You will only run into problems if the size of your module exceeds 64Kb,
which is quite big for a text module. However, there are other
considerations other than just problems, there is a design issue. If you
have four very different reports, it probably makes sense to put all
procedures associated with each report in separate modules, and name that
module in relation to the report. If you have some common code, I would
advise splitting that out into yet another, utility, module, and again give
it a meaningful name. This, together with appropriate and extensive
comments, will make debugging simpler in the future.

--
HTH

Bob Phillips

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

"FSt1" wrote in message
...
hi,
they should be in seperate modules. you can put them in 1 module but this
could cause memory problems and other memory related problems ie run

slow,
stalling ect.

regards
FSt1

"JOUIOUI" wrote:

I'm putting all my Macros in one modual for a series of 4 reports,

should
these be in 4 separate moduals, is there any danger of putting them all

in
one? So far I have about 10 pages of code if I copy it into a word doc.
Thanks for your help.




Dave Peterson

General Question about Moduals
 
And if you (the OP) have any public variables, you may want to use a separate
module for that, too.



Bob Phillips wrote:

Absolutely not true!

You will only run into problems if the size of your module exceeds 64Kb,
which is quite big for a text module. However, there are other
considerations other than just problems, there is a design issue. If you
have four very different reports, it probably makes sense to put all
procedures associated with each report in separate modules, and name that
module in relation to the report. If you have some common code, I would
advise splitting that out into yet another, utility, module, and again give
it a meaningful name. This, together with appropriate and extensive
comments, will make debugging simpler in the future.

--
HTH

Bob Phillips

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

"FSt1" wrote in message
...
hi,
they should be in seperate modules. you can put them in 1 module but this
could cause memory problems and other memory related problems ie run

slow,
stalling ect.

regards
FSt1

"JOUIOUI" wrote:

I'm putting all my Macros in one modual for a series of 4 reports,

should
these be in 4 separate moduals, is there any danger of putting them all

in
one? So far I have about 10 pages of code if I copy it into a word doc.
Thanks for your help.


--

Dave Peterson

Bob Phillips

General Question about Moduals
 
Obviously you was the OP, you already know that I do that <G

Bob

"Dave Peterson" wrote in message
...
And if you (the OP) have any public variables, you may want to use a

separate
module for that, too.



Bob Phillips wrote:

Absolutely not true!

You will only run into problems if the size of your module exceeds 64Kb,
which is quite big for a text module. However, there are other
considerations other than just problems, there is a design issue. If you
have four very different reports, it probably makes sense to put all
procedures associated with each report in separate modules, and name

that
module in relation to the report. If you have some common code, I would
advise splitting that out into yet another, utility, module, and again

give
it a meaningful name. This, together with appropriate and extensive
comments, will make debugging simpler in the future.

--
HTH

Bob Phillips

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

"FSt1" wrote in message
...
hi,
they should be in seperate modules. you can put them in 1 module but

this
could cause memory problems and other memory related problems ie run

slow,
stalling ect.

regards
FSt1

"JOUIOUI" wrote:

I'm putting all my Macros in one modual for a series of 4 reports,

should
these be in 4 separate moduals, is there any danger of putting them

all
in
one? So far I have about 10 pages of code if I copy it into a word

doc.
Thanks for your help.


--

Dave Peterson




Dave Peterson

General Question about Moduals
 
I was piggy backing on your response. And I did mean the original original
poster (OOP???). <vbg

Bob Phillips wrote:

Obviously you was the OP, you already know that I do that <G

Bob

"Dave Peterson" wrote in message
...
And if you (the OP) have any public variables, you may want to use a

separate
module for that, too.



Bob Phillips wrote:

Absolutely not true!

You will only run into problems if the size of your module exceeds 64Kb,
which is quite big for a text module. However, there are other
considerations other than just problems, there is a design issue. If you
have four very different reports, it probably makes sense to put all
procedures associated with each report in separate modules, and name

that
module in relation to the report. If you have some common code, I would
advise splitting that out into yet another, utility, module, and again

give
it a meaningful name. This, together with appropriate and extensive
comments, will make debugging simpler in the future.

--
HTH

Bob Phillips

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

"FSt1" wrote in message
...
hi,
they should be in seperate modules. you can put them in 1 module but

this
could cause memory problems and other memory related problems ie run
slow,
stalling ect.

regards
FSt1

"JOUIOUI" wrote:

I'm putting all my Macros in one modual for a series of 4 reports,
should
these be in 4 separate moduals, is there any danger of putting them

all
in
one? So far I have about 10 pages of code if I copy it into a word

doc.
Thanks for your help.


--

Dave Peterson


--

Dave Peterson


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

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