Thread: array questions
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
bpeltzer bpeltzer is offline
external usenet poster
 
Posts: 180
Default array questions

Is it the array or the directory? It seems to be working fine as long as
either (1) the files exist in the current directory or (2) I specify the path
in the array of names.

"Gary Keramidas" wrote:

for some reason, arrays just don't work like i think they should, so i need
some help

i have an array of file names

arr = Array("File1.xls", "File2.xls", "File3.xls")

why doesn't this open them

For i = LBound(arr) To UBound(arr)
Workbooks.Open Filename:=arr(i), ReadOnly:=True, UpdateLinks:=3

arr(i) contains "file1.xls", but i get an error


--


Gary