try setting the files into the variables to work on them eg:-

Code:
dim wbk as workbook
set wbk = workbooks.open(path)
or set wbk = activeworkbook