+ Reply to Thread
Results 1 to 3 of 3

Macro to import .csv from browse for file location dialog box.

  1. #1
    Registered User
    Join Date
    04-29-2014
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2013
    Posts
    47

    Macro to import .csv from browse for file location dialog box.

    I am trying to automate preparing csv files for import into another program. I have created a button to run a macro to import .csv.

    Please Login or Register  to view this content.
    It lets me chose the file from the browse for location dialog box, but I get an error before the data is loaded.

    Run time error '1004':
    Excel cannot find the text file to refresh this external data range.
    Check to make sure the text file has not been moved or renamed, then try the refresh again.

    At this point in the code:

    Please Login or Register  to view this content.
    I am working with Excel 2010 and 2013, if there are conflicts I would rather it to work with Excel 2013
    Last edited by gutterball; 04-30-2014 at 08:29 AM.

  2. #2
    Registered User
    Join Date
    02-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Macro to import .csv from browse for file location dialog box.

    You don't have the name of the worksheet in the query table, the result is that it is looking for fstr

    Try changing this part

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-29-2014
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2013
    Posts
    47

    Re: Macro to import .csv from browse for file location dialog box.

    ihmha, Thank you. It works just as it should.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] MACRO: Store name of selected file as string w/ import data file dialog box
    By AnnieMcken in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2013, 02:13 PM
  2. Browse and import .csv file into new tab
    By alf40 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-29-2013, 11:22 PM
  3. Browse for File with Suggested Folder Location?
    By Khirsah17 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-28-2010, 09:10 AM
  4. Browse for picture file and put location in cell
    By h_aesa1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-30-2009, 11:21 AM
  5. File Browse Function (Open dialog box for choosing file)
    By b-123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2005, 06:05 PM

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