+ Reply to Thread
Results 1 to 5 of 5

Macro to copy the active sheet to new workbook and rename

  1. #1
    Registered User
    Join Date
    09-10-2014
    Location
    India
    MS-Off Ver
    10
    Posts
    44

    Macro to copy the active sheet to new workbook and rename

    Hi All,

    !! Good Morning !!

    Require your assistance to create a macro for below.

    - To copy a active worksheet to a new work book. Rename the same as "Input" in New workbook.
    - Insert a new sheet and rename the same as "Output" in the above new New workbook.

    Thank you
    Shan

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Macro to copy the active sheet to new workbook and rename

    Hi, Shan,

    maybe try
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Last edited by HaHoBe; 10-06-2014 at 12:49 AM.
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    09-10-2014
    Location
    India
    MS-Off Ver
    10
    Posts
    44

    Re: Macro to copy the active sheet to new workbook and rename

    Hi,
    Thank you.

    Its correctly coping the data as well change the sheet name to "Input".

    The only thing is that the "Output" sheet I want in the New workbook where "Input" file is.

    But macro is creating a "Output" file in original workbook.

    Thank you.

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Macro to copy the active sheet to new workbook and rename

    Hi, Shan,

    if you copy a worksheet over to a new workbook that new workbook automaticly becomes the ActiveWorkbook. And any further action would rely on the ActiveWorkbook if not being explicitely being routed to a different workbook. What you descrtiobed should only happen if you run the code in single step and activate the starting workbook within the code.

    Please Login or Register  to view this content.
    Ciao,
    Holger

  5. #5
    Registered User
    Join Date
    09-10-2014
    Location
    India
    MS-Off Ver
    10
    Posts
    44

    Re: Macro to copy the active sheet to new workbook and rename

    Thank you Sir...

    This code is working fine.

    Thank you so much.

+ 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. Copy and rename a protected sheet into the same workbook
    By B0wser in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2014, 04:02 PM
  2. Macro to Print active sheet as PDF to Active workbook and customize name
    By Scott Taylor in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-17-2012, 08:52 PM
  3. Replies: 2
    Last Post: 09-04-2012, 01:19 AM
  4. Replies: 0
    Last Post: 04-28-2012, 06:06 PM
  5. 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

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