+ Reply to Thread
Results 1 to 5 of 5

copy entire sheet from closed workbook and insert into another workboook when opened

  1. #1
    Registered User
    Join Date
    08-28-2012
    Location
    Whyalla, Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    copy entire sheet from closed workbook and insert into another workboook when opened

    Hello everyone.

    I'm hoping you can assist me.

    I have 2 workbooks. What I want to do, is when one workbook is opened it will run a macro (on open) that goes to a closed workbook, copies a sheet from it and then inserts that sheets information into a sheet in the now open workbook.

    I'm completely new to this so your assistance, patience and understanding would be greatly appreciated.

    Cheers
    Mike
    Last edited by tombie; 05-02-2013 at 09:47 PM.

  2. #2
    Registered User
    Join Date
    04-30-2013
    Location
    Brussels
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: copy entire sheet from closed workbook and insert into another workboook when opened

    Dear tombie,

    You can try someting like this :

    Please Login or Register  to view this content.
    Have fun!
    ExcelTab.com

  3. #3
    Registered User
    Join Date
    08-28-2012
    Location
    Whyalla, Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: copy entire sheet from closed workbook and insert into another workboook when opened

    That worked great thanks...

    Can you give me one more line of code please...

    After the copy of the sheet, what code would i need to then rename the sheet I have just inserted into my main workbook?

    This is the current code:
    Please Login or Register  to view this content.
    Thanks in advance

  4. #4
    Registered User
    Join Date
    08-28-2012
    Location
    Whyalla, Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: copy entire sheet from closed workbook and insert into another workboook when opened

    Just like to say thanks!

    I've solved my issue(s) - Including the deleting of the existing sheet before copying the new data across...

    I ended up running with the following:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-30-2013
    Location
    Brussels
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: copy entire sheet from closed workbook and insert into another workboook when opened

    Yup nice job,

    You could also change your code using this:

    Please Login or Register  to view this content.
    It has the advantage that your workbook does not need to be active for the macro to work.
    But if the workbook is active anyway, your code works fine.


    <== Say thanks by clicking on the star !

    Have fun

+ 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