#1   Report Post  
Jeff
 
Posts: n/a
Default VBA Array

I have code that takes five 100x100 matrix's and put them in the array

Array_Mortality(5,100,100)

The information comes from a spreadsheet = Mortality, the spreadsheet has
five tabs.

The code is in another spreadsheet that uses the array - with a bunch of
other code.

Question = usually I run a macro that uses Array_Mortality, then I might do
some other stuff and then run the macro again. It is a pain to keep opening
up the other file. Is there any way to permanently save the array, so I
don't have to keep on opening the other file, because this slows things down
a lot.

Thanks!
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Jeff,

Declare the array as public at the top of your module:

Public Array_Mortality(1 to 5, 1 to 100, 1 to 100) As Double

Then fill it using a dedicated macro that does nothing else. Then, until you close the workbook,
the array will be available to all the other macros.

HTH,
Bernie
MS Excel MVP


"Jeff" wrote in message
...
I have code that takes five 100x100 matrix's and put them in the array

Array_Mortality(5,100,100)

The information comes from a spreadsheet = Mortality, the spreadsheet has
five tabs.

The code is in another spreadsheet that uses the array - with a bunch of
other code.

Question = usually I run a macro that uses Array_Mortality, then I might do
some other stuff and then run the macro again. It is a pain to keep opening
up the other file. Is there any way to permanently save the array, so I
don't have to keep on opening the other file, because this slows things down
a lot.

Thanks!



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
Pass an array to Rank Biff Excel Worksheet Functions 12 June 29th 05 04:15 PM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM
Where is the bug in my array? Gail Gurman Excel Discussion (Misc queries) 1 January 25th 05 12:36 AM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
VBA Import of text file & Array parsing of that data Dennis Excel Discussion (Misc queries) 4 November 28th 04 10:20 PM


All times are GMT +1. The time now is 02:27 AM.

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"