+ Reply to Thread
Results 1 to 7 of 7

Import data from an excel workbook to another workbook without manually selecting

  1. #1
    Forum Contributor
    Join Date
    06-20-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    106

    Import data from an excel workbook to another workbook without manually selecting

    Hi all,

    I'm trying to write a VBA code in my worksheet ( blank excel sheet) to pull data from another excel sheet without opening that file.

    This code will open a new window to open my file and range. But, I'm trying to avoid the process of going through different windows to select my data.

    I need this file to pull data from my C:\ directory with the range that I want. I use active X button for my convenience.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Import data from an excel workbook to another workbook without manually selecting

    Is it a particular workbook you want to pull the data from?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    06-20-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: Import data from an excel workbook to another workbook without manually selecting

    Yes, I want to pull it from Sheet1 in the Excel.xlsx Workbook

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Import data from an excel workbook to another workbook without manually selecting

    Perhaps.
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    06-20-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: Import data from an excel workbook to another workbook without manually selecting

    Thank you for this post. But, this still opens a message box for me to select the range and my destination. I want it to select certain range ex: A1:E10 and paste it automatically in my worksheet. So, basically all the message boxes should be automated.

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Import data from an excel workbook to another workbook without manually selecting

    Replace Application.Inputbox with appropriate references for the source and destination ranges.

    For example to copy A1:E10 from the active sheet of the source workbook to A1 on the active sheet of the destination sheet.
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    06-20-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: Import data from an excel workbook to another workbook without manually selecting

    Thank you so much It works!!

+ 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