View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Myrna Larson Myrna Larson is offline
external usenet poster
 
Posts: 863
Default 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
:)