Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Array Declaration
Hi I'm trying to use an fixed array. Several macros will need to use thi array and the contents of the array will be subject to continuou changes. Where and how do I declare the existence and size of this array? Regards, Mike : -- mikey1 ----------------------------------------------------------------------- mikey10's Profile: http://www.excelforum.com/member.php...fo&userid=1537 View this thread: http://www.excelforum.com/showthread.php?threadid=27020 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Array Declaration
If you write
Dim MyArray(1 to 30) As Variant at the top of the module, outside of any procedures, it will be available to all procedures in the module. Note that what I wrote is a fixed-sized or static array. You can't change the size with a Redim statement. If you want to do that, write it as Dim MyArray() AS Variant One of your procedures must, of course, use Redim to set the size. On Mon, 18 Oct 2004 12:43:24 -0500, mikey10 wrote: Hi I'm trying to use an fixed array. Several macros will need to use this array and the contents of the array will be subject to continuous changes. Where and how do I declare the existence and size of this array? Regards, Mike :) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Array Declaration
Several macros will need to use this array
Then you should declare it at the top of a standard module: Dim MyArray(1 to 100, 1 to 2) as String If some of the routines that will use the array are in other modules then you have to declare the variable as Public: Public MyArray(1 to 100, 1 to 2) as String -- Jim Rech Excel MVP "mikey10" wrote in message ... | | Hi | | I'm trying to use an fixed array. Several macros will need to use this | array and the contents of the array will be subject to continuous | changes. | Where and how do I declare the existence and size of this array? | Regards, | Mike | :) | | | -- | mikey10 | ------------------------------------------------------------------------ | mikey10's Profile: http://www.excelforum.com/member.php...o&userid=15378 | View this thread: http://www.excelforum.com/showthread...hreadid=270204 | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Array Declaration. | Excel Discussion (Misc queries) | |||
dYNAMIC Array declaration, a small correction in my last thread! | Excel Programming | |||
which declaration to use | Excel Programming | |||
Declaration? | Excel Programming | |||
Variable Declaration?? | Excel Programming |