LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Best place to declare variables

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?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Declare variables to a code? Pas Excel Discussion (Misc queries) 6 April 10th 10 01:14 PM
Declare Variables in Array Mike H. Excel Discussion (Misc queries) 2 March 11th 09 12:33 PM
Declare and Set Public variables jlclyde Excel Discussion (Misc queries) 2 January 28th 09 02:16 PM
how to declare local variables for Excel.Workbook at runtime. Daffo Excel Discussion (Misc queries) 0 October 9th 06 12:19 PM
How to efficiently declare variables Jeff Excel Discussion (Misc queries) 2 June 29th 06 01:56 PM


All times are GMT +1. The time now is 08:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"