Array of data in Excel Visual Basic

G

Gaza

Hi
I have a big 3 dimensions array of data (integers).
I want to load this data the first time the workbook will run so i could use it later on in functions/formulas that I'll create in VB.

example:

Dim arr(10,10,10) As Integer
Public Function GetData(x,y,z) As Integer
GetData = arr(x,y,z)
End Function

How do I load the data into the arr(10,10,10) array (let say the data is in other excel file or in one of the sheets in the same workbook)

I don't want to load the data every time I call the function from the worksheet - it is big data base

Thanks
Gaza
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top