+ Reply to Thread
Results 1 to 11 of 11

Insert existing worksheet into workbook

  1. #1
    Registered User
    Join Date
    03-09-2008
    Posts
    10

    Insert existing worksheet into workbook

    How do I insert an existing worksheet (previously exported from the same workbook)? I need to be able to do it programmatically.

    Thank you!!

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524
    Hi,
    You may have to provide more info, are you trying to insert a worksheet into another workbook?

  3. #3
    Registered User
    Join Date
    03-09-2008
    Posts
    10

    RE: Insert existing worksheet into workbook

    I need to insert an existing worksheet into the workbook. The worksheet was previously exported (ActiveWorkbook.SaveAs) from the workbook. I need to reinsert it into the same workbook it was exported from.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    03-09-2008
    Posts
    10

    Question RE: Insert existing worksheet into workbook

    Thanks for the help. I tried it but I get an error: Run-time error '1004': Method 'Add' of object 'Sheets' failed. Any idea?

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Did you change the path and filename as appropriate?

  7. #7
    Registered User
    Join Date
    03-09-2008
    Posts
    10

    Question RE: Insert existing worksheet into workbook

    I'm pretty sure. I've looked at through debugger. I even tried to use a hard coded path instead but no luck.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Hmm. Try
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    03-09-2008
    Posts
    10

    Question RE: Insert existing worksheet into workbook

    Exactly the same error!!!

    I'm obviously doing something wrong but what?

  10. #10
    Registered User
    Join Date
    03-09-2008
    Posts
    10

    Thumbs up RE: Insert existing worksheet into workbook

    Got it. It's:
    Sheets.Add Type:="C:\somePath\the file I saved earlier"

    Weird. Thank you!

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Good job, glad you got it sorted.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 09-28-2008, 10:00 AM
  2. using cell content to reference a worksheet tab name in second workbook
    By Conor in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2007, 09:32 AM
  3. how to close a workbook without saving a individual worksheet?
    By vjarowdy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2007, 05:44 PM
  4. Copy worksheet to an existing workbook not working
    By elliemay2 in forum Excel General
    Replies: 12
    Last Post: 06-15-2007, 01:42 AM
  5. Can someone explain this macro to me?
    By gav_69 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-29-2007, 06:04 AM

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