Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Declare and Set Public variables | Excel Discussion (Misc queries) | |||
public variables | Excel Discussion (Misc queries) | |||
Public variables | Excel Discussion (Misc queries) | |||
Public Variables | Excel Discussion (Misc queries) | |||
Declaring variables in Module vs. Public | Excel Discussion (Misc queries) |