Solved

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

Posted on 2013-10-28
4
262 Views
Last Modified: 2013-11-01
Refering to http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_27291376.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 :
error message

What has happened ?
0
Comment
Question by:ceneiqe
  • 2
  • 2
4 Comments
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 150 total points
Comment Utility
try

Set textFile = FSO.OpenTextFile(folder & "\" & currentFile)
0
 

Author Comment

by:ceneiqe
Comment Utility
Thanks it works !

May i understand why  the change in code ?
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
Comment Utility
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.
0
 

Author Comment

by:ceneiqe
Comment Utility
ok strange. i didn't change the default directory.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

In case Office 2010 has not been deployed in your environment, this article may be quite useful. In our office, we wanted a way to deploy Microsoft Office Professional Plus 2010 through an automated batch file via logon script. This article is docum…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now