No.
You'll need 4 parms for each value to return.
You need to specify the path, workbook name, sheet name, and cell address.
But you'll have entries in this portion:
myLocations = Array( _
Array("c:\my documents\excel", "book3.xls", "sheet1", "A1"), _
Array("c:\my documents\excel", "book4.xls", "sheet1", "A1"), _
Array("c:\my documents\excel", "book5.xls", "sheet1", "A1"))
Miikka Hamalainen wrote:
Yes, but what if I have only 3 files I need to get the info, then I should
have 3 parameters, right?
Br, Miipe
"Dave Peterson" kirjoitti
...
You dropped the 4th parm.
MsgBox GetValue(myLocations(iCtr)(1), myLocations(iCtr)(2), _
myLocations(iCtr)(3), myLocations(iCtr)(4))
wrote:
I get compile error "argument not optional" on GetValue
For iCtr = LBound(myLocations) To UBound(myLocations)
MsgBox GetValue(myLocations(iCtr)(1), myLocations(iCtr)(2),
myLocations(iCtr)(3))
Next iCtr
Something wrong?
Br, Miipe
--
Dave Peterson
--
Dave Peterson