For i = LBound(myArray) To UBound(myArray)
filename = myarray(i)
'rest of code
Next i
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Nikky" wrote in message
...
I have a macro written to open a .csv file, process, and close it, but I'm
having trouble figuring out how to loop through a list I define that will
give each of the document names to open. I could read in a list from a
..txt
or even define the list manually in VB, but I'm not sure how to "tell" the
loop to pick an item in the array, then define that number as a variable
that I can enter in my command to open the document, then (after closing)
run
the next item in the array.
The array contents resemble {769290163 6017502167 5621119573 ...}
The document names resemble 769290163.csv