Posted by: akawi June 11, 2008
EXCEL VBA EXPERTS HELP!!!!!!!!!!!!!!
Login in to Rate this Post:     0       ?        
Make a file such as "files.txt" with the names of all excel files in it. In your macro add:

    Open "files.txt" For Input As #1
    For i = 1 To 100 '(number of files =100)
        Input #1, fName ' fName is the name of file.
***********     
'Add your macro here: eg.,
workbooks.open(fName)
' Other scripts


workbooks(fName).close 'better to close the excel file before opening next
************

    Next i
    Close #1 'don't forget to close the text file

Read Full Discussion Thread for this article