+ Reply to Thread
Results 1 to 5 of 5

Importing a user defined CSV file

  1. #1
    Registered User
    Join Date
    05-22-2013
    Location
    Columbia, MD
    MS-Off Ver
    Excel 2010
    Posts
    12

    Importing a user defined CSV file

    (from this thread)
    Quote Originally Posted by JBeaucaire View Post
    I suppose this is how I would change my macro then, I've added a second separate function that presents a dialog box to select a CSV file to add to your workbook. Keep selecting files, press Cancel when done to end the loop.
    Please Login or Register  to view this content.

    IN the GetFileName function, you can remove the .InitialFileName line if you don't want to control where the dialog box starts each time.
    Hello! I am in a similar predicament with importing csv files to a separate spreadsheet, BUT, I am looking to import just one csv file to a new spreadsheet. Would I just exclude the loop from the code. My current project has the gives the user a choice to either open/import a selected csv file into a currently active spreadsheet(appending it to the buttom of current text or an empty spreadsheet) or import a selected csv file into a fresh spreadsheet in the same active workbook. My project currently has the ability to append a selected csv to the currently active sheet. Thanks in advance!
    Last edited by JBeaucaire; 05-23-2013 at 10:13 AM. Reason: Moved to a thread of its own as per Forum Rules. Please stop and read the rules. (Link above in the menu bar) Thanks.

  2. #2
    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 a user defined CSV file

    You keep referring to "your current project". Care to share the code for that workbook?
    _________________
    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!)

  3. #3
    Registered User
    Join Date
    05-22-2013
    Location
    Columbia, MD
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Importing a user defined CSV file

    Sure thing. The chunk of code is for the buttons and the second chunk is for the userform.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-22-2013
    Location
    Columbia, MD
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Importing a user defined CSV file

    Ok so I figured it out! This is my new code

    Please Login or Register  to view this content.
    Thank you for your time! :D

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Importing a user defined CSV file

    Please mark your thread as Solved.

    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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