+ Reply to Thread
Results 1 to 6 of 6

How to add existing sheet to an opened workbook?

  1. #1
    Registered User
    Join Date
    02-18-2007
    Location
    Manila / Philippines
    Posts
    42

    How to add existing sheet to an opened workbook?

    Hi,

    I've an open workbook (open.xls) that contains a number of sheets.

    I also have an saved workbook with the name "saved.xls" which is a single sheet.

    Now, I want a command that adds "saved.xls" to "open.xls" and renames it to "Sheet1".

    How would I have to do it?

    Any ideas are greatly appreciated.

    Cheers,
    hegisin

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Select "saved.xls" > right click sheet tab > select Move or copy > with the to book dropdown select "open.xls" > click ok.

    Then rename as required

    http://www.bettersolutions.com/excel...T423111411.htm

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    02-18-2007
    Location
    Manila / Philippines
    Posts
    42
    Hi VBA Noob,

    Thanks for your reply.

    I know about this option but don't like to do it that way because my "saved.xls" sheet contains a web query. If I use the "move" function then the web query cannot refresh its data anymore.

    Therefore I would like to open the existing "saved.xls" sheet directly in the "open.xls" workbook.

    Is there any way to do that?

    Cheers,
    hegisin

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Sorry with code it might be something like

    Please Login or Register  to view this content.
    Amended
    Is the same as the manual way so you will have the same problem.
    Change
    Please Login or Register  to view this content.
    to activesheet if you don't know the name

    VBA Noob
    Last edited by VBA Noob; 10-20-2007 at 03:56 AM.

  5. #5
    Registered User
    Join Date
    02-18-2007
    Location
    Manila / Philippines
    Posts
    42
    Mmh, that also just moves the worksheet and I lose the web query refresh ability.

    I believe the "saved.xls" sheet must be opened directly within the "open.xls" workbook.

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Start a new thread with a title that describes the problem. I answered your original question which has nothing to do with what your trying to do

    suggest title. "Retain links when moving a web query sheet to a another book"

    VBA Noob

+ 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