+ Reply to Thread
Results 1 to 6 of 6

Macro for sheet importing working differently in 2007 vs 2003

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

    Macro for sheet importing working differently in 2007 vs 2003

    Need an extra set of eyes. I helped an OP in this thread:
    http://www.excelforum.com/excel-gene...le-import.html

    And he's getting no results, only getting a filename pasted into his activeworkbook. He's on Excel 2007 and I'm using 2003.

    Here's the macro and it works fine for me, importing all the files in one folder and pasting them one above the other in the activeworkbook:
    Please Login or Register  to view this content.
    I'm just looking for anything that might cause this to not work in his environment since I can't test it.
    _________________
    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!)

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Macro for sheet importing working differently in 2007 vs 2003

    JBeaucaire,

    If you can get the Op to post a copy of a data file, I will test your code in Excel 2007.
    Last edited by stanleydgromjr; 05-29-2009 at 11:00 PM.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

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

    Re: Macro for sheet importing working differently in 2007 vs 2003

    The OP said he could not, but the problem he's having is that it isn't reading the sheets anyway, it's just pasting in a sheet name. I actually saw that same thing once early on on setting up the macro, but it stopped doing that when I included the ws reference in the copy command.

    On my system, ALL the files I put in the designated directly get read into the activeworkbook and stacked one on top of the other.

    In fact, the VT* filter isn't actually working right, but that's ok since he said the folder would be only the files he wants read in anyway.

    If you could test it with just any scrap files, it should work indiscriminately. Thanks for checking it out.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Macro for sheet importing working differently in 2007 vs 2003

    Application.FileSearch has been deprecated in XL2007.

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

    Re: Macro for sheet importing working differently in 2007 vs 2003

    Quote Originally Posted by DonkeyOte View Post
    Application.FileSearch has been deprecated in XL2007.
    Ouch! Tough call...why take it out? Did they give 2007 users something better?

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Macro for sheet importing working differently in 2007 vs 2003

    I don't know the ins and outs as to why it was deprecated but if you google you will find lots and lots of disgruntled users and subsequent workarounds... there are no doubt some here too.

    The link below has a workaround c/o Nate Oliver (MS Excel MVP):

    http://www.mrexcel.com/forum/showthr...228168#1253882

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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