+ Reply to Thread
Results 1 to 6 of 6

Macro to copy a hidden worksheet to an existing workbook then rename.

  1. #1
    Forum Contributor
    Join Date
    04-19-2016
    Location
    Michigan
    MS-Off Ver
    15.0
    Posts
    130

    Macro to copy a hidden worksheet to an existing workbook then rename.

    Good afternoon,

    I am trying to create a macro that will grab a inactive/hidden worksheet and move it to another existing Excel file, then rename that new sheet according to a cell value.

    I tried searching - and this comes up as something close, but it prompts to ask what name should be assigned, while I want it to be renamed just accordingly to one of the cells. It also copies the active worksheet rather than another predesignated ws. Also, it copies the ws to a new file, rather than an existing one.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Macro to copy a hidden worksheet to an existing workbook then rename.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    04-19-2016
    Location
    Michigan
    MS-Off Ver
    15.0
    Posts
    130

    Re: Macro to copy a hidden worksheet to an existing workbook then rename.

    It seems to just copy the sheet into the file I was working on, rather than the destination file.

    Here is my tweaked code:

    Please Login or Register  to view this content.
    Any help is appreciated!

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Macro to copy a hidden worksheet to an existing workbook then rename.

    You should try something like this:

    Please Login or Register  to view this content.
    It copies the worksheet before the first worksheet and the renames it
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  5. #5
    Forum Contributor
    Join Date
    04-19-2016
    Location
    Michigan
    MS-Off Ver
    15.0
    Posts
    130

    Re: Macro to copy a hidden worksheet to an existing workbook then rename.

    Can I replace
    Please Login or Register  to view this content.
    with:
    Please Login or Register  to view this content.

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Macro to copy a hidden worksheet to an existing workbook then rename.

    yes, but indicate the workbook too

    Please Login or Register  to view this content.

+ 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. Macro to Copy specific worksheet to an existing workbook
    By Shellybelly in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-10-2015, 05:56 PM
  2. Replies: 11
    Last Post: 11-04-2013, 04:32 PM
  3. Replies: 3
    Last Post: 10-14-2013, 03:06 PM
  4. Replies: 2
    Last Post: 09-04-2012, 01:19 AM
  5. Replies: 0
    Last Post: 04-28-2012, 06:06 PM
  6. Copy and rename a sheet in an existing workbook?
    By robertse in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-09-2010, 02:00 PM
  7. copy worksheet that is hidden and rename it using a userfom
    By iscar_marius in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-17-2009, 06:03 AM

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