+ Reply to Thread
Results 1 to 4 of 4

Need code to get data from an open workbook

  1. #1
    Forum Contributor
    Join Date
    09-05-2007
    Posts
    148

    Need code to get data from an open workbook

    Here is my situation. I have a work book that i'm working with. I have a sheet, let's say Data_Old. I want code that will delete data from cell A3 to the last used cell (e.g B50).

    I then want the macro to look through my open woorkbooks and find a worksheet sheet called Data_new. I then want it to copy the data from A3 to the last item(e.g B60) and then paste it into Data_old.

    If someone could give me some code on how to do that, it would be great. I would then be able to minipulate it for similar situations.

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    11-15-2007
    Location
    England
    MS-Off Ver
    Office Pro Plus 2021
    Posts
    424

    Re: Need code to get data from an open workbook

    Try this. I don't know the names of your workbooks so have used the same as the worksheets.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-05-2007
    Posts
    148

    Re: Need code to get data from an open workbook

    Thanks for that.

    What if I don't have the name of the workbook with the new data? This will be a workbook outputed from another program and will use a random name. Can this code be ammended to search for the "Data_new" sheet in all the open worksheets?

    Thanks

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Need code to get data from an open workbook

    it's a bit tricky without seeing your data, but something like:

    Please Login or Register  to view this content.
    Last edited by Kyle123; 10-20-2011 at 07:42 AM.

+ 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