Creating arrays using dynamic array names
Posted on 2011-02-21
I am trying to create a function that will create several arrays all from different files. I want to be able to pass the array name and file name to the function and have it create the arrayname based on what I have sent.
Here is a simplified sample
MyArrayName = "Commision"
MyFileName = "c:\commisson.xls"
Call MakeArray(MyArrayName, MyFileName)
' read data...
MyArrayName(i, j) = Range(data).Value
I have several files to import. Is this possible? and how do I go about doing this?