+ Reply to Thread
Results 1 to 7 of 7

Grab data from another workbook

  1. #1
    Registered User
    Join Date
    12-21-2006
    MS-Off Ver
    Office 2013
    Posts
    73

    Grab data from another workbook

    I am trying to get data from one workbook and put it in another.

    What is the VB code to get this done?

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,075
    It depends what you are actually trying to do. Can you zip a copy of your spreadsheet and attach it to your post and tell us what particular data you want in the new workbook? This would help anyone trying to answer your question.
    Trish in Oz
    -------------
    A problem well defined is a puzzle half solved


    If you attach a sample of your workbook it will be easier to find a solution. Remember to remove/replace sensitive data before uploading the file. Look here if you need help with attachments:
    http://www.excelforum.com/faq.php?fa...b3_attachments

  3. #3
    Registered User
    Join Date
    12-21-2006
    MS-Off Ver
    Office 2013
    Posts
    73
    all i'm trying to do is pull data from certain cells on one workbook to use in another one

  4. #4
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Can you be more specific? How do you determine which cells you want to copy over? Is it variable, or do you want the same cells pulled over each time? Do you NEED VB, as your request seems to be easily accomplished using a formula?

  5. #5
    Registered User
    Join Date
    12-21-2006
    MS-Off Ver
    Office 2013
    Posts
    73
    ok, how it works is I have a list of vehicles, each with a corresponding unit number. i want to be able to search thru the list of vehicles in another workbook and find whichever one is selected in a combobox on the first workbook to get information from the first workbook. seeing as how i will have to do a do..while loop, i can't really use a formula to find the right unit.

    all i really need is the VB syntax to open another workbook and grab data from particular cells.

  6. #6
    Registered User
    Join Date
    12-21-2006
    MS-Off Ver
    Office 2013
    Posts
    73
    so does anyone know how to accomplish this?

  7. #7
    Registered User
    Join Date
    12-21-2006
    MS-Off Ver
    Office 2013
    Posts
    73
    ok well i figured something out, but i am getting an error for some reason and can't figure out what it is.

    Please Login or Register  to view this content.
    now when i change the name of the workbook to a different file, it will work. when i change it back and try to run the code i get a runtime 1004 error.

    anyone got any clues?

    edit: nevermind, figured it out. had that extra apostrophe in there
    Last edited by enphynity; 05-25-2007 at 05:04 PM.

+ 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