Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default naming multiple public variables generated by single function

i have a function that i use on several worksheets to create a variable of
different names that is public

since the public variable needs to be dimensioned in the declarations
section of the module, i need to know the name of the variable, but will not
until the function runs, unless i dim every possible name that might be used
(?)

ex:
the function counts the number of rows of data on sheets 1, 2, 3...

the function would return public variables: lSheet1RowsData,
lSheet2RowsData, lSheet3RowsData,

for this to run, i would need to dim every possible lSheet...RowsData in
declarations, which seems to defeat the whole point a creating this
function.

i'm sure that there's a trick ?

thanks in advance,
mark


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default naming multiple public variables generated by single function

Perhaps an array, indexs indentifying the sheet.


-----Original Message-----
i have a function that i use on several worksheets to

create a variable of
different names that is public

since the public variable needs to be dimensioned in the

declarations
section of the module, i need to know the name of the

variable, but will not
until the function runs, unless i dim every possible name

that might be used
(?)

ex:
the function counts the number of rows of data on sheets

1, 2, 3...

the function would return public variables:

lSheet1RowsData,
lSheet2RowsData, lSheet3RowsData,

for this to run, i would need to dim every possible

lSheet...RowsData in
declarations, which seems to defeat the whole point a

creating this
function.

i'm sure that there's a trick ?

thanks in advance,
mark


.

Reply
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 and Set Public variables jlclyde Excel Discussion (Misc queries) 2 January 28th 09 02:16 PM
public variables johnny Excel Discussion (Misc queries) 7 February 27th 08 03:44 PM
Public variables johnny Excel Discussion (Misc queries) 2 February 24th 08 05:05 AM
Public Variables Jerry McNabb Excel Discussion (Misc queries) 0 February 24th 08 01:26 AM
Declaring variables in Module vs. Public Jeff Excel Discussion (Misc queries) 5 November 19th 07 08:27 PM


All times are GMT +1. The time now is 02:07 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"