View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Lance[_2_] Lance[_2_] is offline
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


.