Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
Medium Priority
?
327 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 600 total points
ID: 39604964
try

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

Author Comment

by:ceneiqe
ID: 39607536
Thanks it works !

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

Expert Comment

by:Saqib Husain, Syed
ID: 39609728
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
ID: 39616799
ok strange. i didn't change the default directory.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

604 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