+ Reply to Thread
Results 1 to 2 of 2

Import selected file to specific sheet

  1. #1
    Registered User
    Join Date
    01-09-2009
    Location
    Milwaukee, Wisconsin
    MS-Off Ver
    Excel 2003
    Posts
    2

    Import selected file to specific sheet

    Greetings;

    I need to have a user import a file that he or she would select, and have it import to a specific sheet that will probably be hidden in the final Excel workbook. I recorded a macro that imports a file onto the sheet I currently have active with cell A1 selected.

    Of course, if I run that macro it imports the same file into whichever sheet I have selected although it WILL start the data in cell A! no matter which cell I have selected.

    How do I modify the macro to allow the user to select a specific file to import and force the data to be imported to a specific sheet?

    Thanks.
    John

  2. #2
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848

    Re: Import selected file to specific sheet

    The following can be added to the beginning of your macro:

    Please Login or Register  to view this content.
    Within the macro, change any reference to the specific file with strSourceFile. And any reference to A1 with rngDest.

    Have the user select the cell where the data is to be imported before running the macro.

    If you run into any difficulties, please post your recorded macro, making sure to change any info that you do not want to be public.
    Last edited by mdbct; 09-02-2009 at 09:45 PM. Reason: rewording of process

+ 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