Link to home
Start Free TrialLog in
Avatar of ceneiqe
ceneiqeFlag for Australia

asked on

Create a macro to compile data in multiple .txt files into one .xls file - Part 2 (extraction) - in Excel 2010

Refering to https://www.experts-exchange.com/questions/27291376/Create-a-macro-to-compile-data-in-multiple-txt-files-into-one-xls-file-Part-2-extraction.html,

I have upgraded from MS office 2000 to office 2010.

and there is an error at the following comment:

Set textFile = FSO.OpenTextFile(currentFile)

see error message :
User generated image

What has happened ?
ASKER CERTIFIED SOLUTION
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ceneiqe

ASKER

Thanks it works !

May i understand why  the change in code ?
Apparently, previously the default directory was where the files were present. On the new system the files were not in the default directory. This new syntax includes the path name of the file together with the file name.
Avatar of ceneiqe

ASKER

ok strange. i didn't change the default directory.