+ Reply to Thread
Results 1 to 5 of 5

Import Button For Excel 2007

  1. #1
    Registered User
    Join Date
    01-08-2014
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    3

    Import Button For Excel 2007

    I've been trying to create a button that allows the user to open a csv file and import the data from that into the worksheet, without losing the existing spreadsheet format. I can do it with cut and paste, but want to be able to just import by choosing the file in a dialog box.

    Here's what I have, so far:

    Please Login or Register  to view this content.
    Any way to force the subroutine to open a dialog box and import the data, by choosing the file, without disturbing the buttons and routines on the sheet?

    Thank you.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Import Button For Excel 2007

    Hi Teri and welcome to the forum.

    Type this into your immediate window and press enter..

    Please Login or Register  to view this content.
    I think this is what you are asking to find.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    01-08-2014
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Import Button For Excel 2007

    Thanks for the fast reply, Marvin.

    Unfortunately, that overwrites all of the buttons and code.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Import Button For Excel 2007

    Hi,

    You do the Application.FindFile and import the data into another (new) sheet and then copy and paste all of it to your formatted sheet and then close the csv file, all in VBA code.

    Here is some exact code that I use to do what I think you want. You will need to copy and paste your appropriate parts where you need them...

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-08-2014
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Import Button For Excel 2007

    Thank you, Marvin. I'll definitely have to try it in the morning.

    Sorry, I'm suffering brain block from lack of sleep, at the moment.

    Much appreciated.

+ 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. Excel 2007 to Outlook 2007 assigned task import
    By mjwillyone in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-15-2014, 04:48 AM
  2. Xml import in excel 2007
    By Bikash Shaw in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-25-2013, 05:05 AM
  3. Excel 2007 Import from text on XP vs 7
    By michael.monaco in forum Excel General
    Replies: 4
    Last Post: 10-04-2012, 04:54 PM
  4. [SOLVED] import txt file to excel 2007
    By elamranii in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 08-07-2012, 10:13 PM
  5. Text Import wizard in Excel 2007
    By munna316 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 09-19-2011, 10:03 AM

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