+ Reply to Thread
Results 1 to 8 of 8

Importing CSV file in 2010. The Filesearch function works in 2003, but not in 2010.

  1. #1
    Forum Contributor
    Join Date
    07-29-2008
    Location
    New York
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    145

    Importing CSV file in 2010. The Filesearch function works in 2003, but not in 2010.

    Good day to all:

    I have a problem. Found a code created by Tom Ogilvy on a website:
    HTML Code: 
    But the code works well for 2003, but it does not work when I put it in a 2010 file. I did some research, and found that the "Filesearch" function does work in 2010 (or maybe I don't know how to get it to work).

    This is the code. Can someone help me in amending the code, or providing a different way of achieving a smooth running code?

    Please Login or Register  to view this content.
    Last edited by Xrull; 03-13-2012 at 06:15 PM.

  2. #2
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Importing CSV file in 2010. The Filesearch function works in 2003, but not in 2010.

    FileSearch was removed in 2007 and in all likelihood is not coming back. If you search this forum (and others) you will find lots of alternatives - usually Dir or the Scripting.FileSystemObject
    Good luck.

  3. #3
    Forum Contributor
    Join Date
    07-29-2008
    Location
    New York
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    145

    Re: Importing CSV file in 2010. The Filesearch function works in 2003, but not in 2010.

    Hi OnErrorGoto0,

    I am having a difficult time understanding how to use the Dir and Scripting.FileSystemObject.
    I searched for weeks to find the code I've posted, but most of the codes I see on line, seem to be for a specific csv file layout.

    I'll keep searching for a solution, and I'll read up on the Dir and Scripting.FileSystemObject method.

    Thanks,
    Xrull

  4. #4
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Importing CSV file in 2010. The Filesearch function works in 2003, but not in 2010.

    FileSearch / Dir / FileSystemObject have nothing to do with your csv file layout - they are just means of finding all the csv file for processing.

  5. #5
    Forum Contributor
    Join Date
    07-29-2008
    Location
    New York
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    145

    Re: Importing CSV file in 2010. The Filesearch function works in 2003, but not in 2010.

    OnErrorGoto0,
    I'm still looking for a line of code that works (and putting bits and pieces of codes together), but I'm having no success. I have no clue how the methods you mentioned work, but I'm reading up on them.
    Thanks again,
    Xrull

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Importing CSV file in 2010. The Filesearch function works in 2003, but not in 2010.

    Perhaps this link could be of help?

    http://excel-it.com/Excel%202007/2007_filesearch.htm

    Alf

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Importing CSV file in 2010. The Filesearch function works in 2003, but not in 2010.

    'CSVs To One Sheet (Stacked)

    A macro for importing all CSV files in a folder into a single Excel sheet, each CSV filename will be listed on the sheet next to the data that it came from.

    CSVs to 1 Sheet - Part 1



    There are other macros in the same area for similar functions.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  8. #8
    Forum Contributor
    Join Date
    07-29-2008
    Location
    New York
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    145

    Re: Importing CSV file in 2010. The Filesearch function works in 2003, but not in 2010.

    JBeaucaire,

    Thank you very much I was about to lose my mind.
    crazy_man_straight_jacket_md_wht.gif
    Thanks to everybody else for the useful links and codes.
    I'm going try to understand the code.
    Regards,
    Xrull

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1