T
Taras
Where is the best place to declare variables, in terms of
memory utilization, etc. if the same variable names are
used in different modules, although their values do not
(always) need to be passed between modules.
ex:
Module A is used to summarize data on Sheet1 of a
Workbook into Sheet2
Module B is used to summarize data on Sheet3 of a
Workbook into Sheet4
There are no common functions/subs between Module A and
Module B (Module C has functions/subs called by both
Module A and B - but that could be a red herring)
In Module A and Module B I use the same variable names -
just for consistency.
Is it more efficient to declare the variables with DIM in
Module A & Module B or to declare them as Public
elsewhere?
memory utilization, etc. if the same variable names are
used in different modules, although their values do not
(always) need to be passed between modules.
ex:
Module A is used to summarize data on Sheet1 of a
Workbook into Sheet2
Module B is used to summarize data on Sheet3 of a
Workbook into Sheet4
There are no common functions/subs between Module A and
Module B (Module C has functions/subs called by both
Module A and B - but that could be a red herring)
In Module A and Module B I use the same variable names -
just for consistency.
Is it more efficient to declare the variables with DIM in
Module A & Module B or to declare them as Public
elsewhere?