+ Reply to Thread
Results 1 to 7 of 7

Copy/Paste sheets from one WS-A to another WS-B with some sheets hidden

  1. #1
    Registered User
    Join Date
    01-14-2021
    Location
    Egypt
    MS-Off Ver
    Office 365
    Posts
    5

    Unhappy Copy/Paste sheets from one WS-A to another WS-B with some sheets hidden

    L&G,

    I'm new to the world of VBA & Macros. I tried self-learning by searching online for and applying the codes to my current sheets.
    What I need to do now on my current project (I have looked and unfortunately failed) is:

    1- Copy the entire sheets in Workbook A (xlsm file).
    2- Sheet names in Workbook A are unconventional (i.e: full routine, training calendar, results, etc...).
    3- Paste those copied sheets exactly with their entire content into a new Workbook B (xslm file).
    4- Have certain sheets hidden in the new Workbook B (not deleted, i.e: training calendar).
    5- The code should only be applied when you click a button in Workbook A (i.e: Export File) and should be placed in the first sheet of Workbook A.
    6- Once this button is clicked, it would allow the user to save the new Workbook B in any destination on his computer.

    I really would appreciate it if anyone can help me as this had me going crazy.

    Thanks
    Sha2shoo2

  2. #2
    Registered User
    Join Date
    01-14-2021
    Location
    Egypt
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Copy/Paste sheets from one WS-A to another WS-B with some sheets hidden

    Hey,

    I really would appreciate it if anyone can help me with this.


    Thanks
    Sha2shoo2

  3. #3
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Copy/Paste sheets from one WS-A to another WS-B with some sheets hidden

    It would help us to help you if you could upload a sample file, as per the yellow banner above. Just replace your data with x's so we can see your file structure.

  4. #4
    Registered User
    Join Date
    01-14-2021
    Location
    Egypt
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Copy/Paste sheets from one WS-A to another WS-B with some sheets hidden

    I have added a sample worksheet as a reference.

    Thanks
    Sha2shoo2
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-14-2021
    Location
    Egypt
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Copy/Paste sheets from one WS-A to another WS-B with some sheets hidden

    maniacb, i just added a sample below as requested.

    Thanks
    Sha2shoo2

  6. #6
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Copy/Paste sheets from one WS-A to another WS-B with some sheets hidden

    Here is the code that should meet your requirements. It is not in the same order of events that you highlighted but it achieves the same result. This approach hides the necessary sheet, saves the original file with a new name - date added, then reopens the original file name. Let us know how it goes. You then have both the new file and the original file open. See code to activate closing new file if that is what you wish.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-14-2021
    Location
    Egypt
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Copy/Paste sheets from one WS-A to another WS-B with some sheets hidden

    Maniacb, thank you so much for your assistance.
    The code worked like a charm, I really appreciate your help.

    Regards
    Sha2shoo2

+ 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. [SOLVED] copy - paste of multiple very hidden sheets to a new worksheet
    By Elainefish in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2019, 09:15 AM
  2. Create Sheets, separate records, copy-paste cell values from master to created sheets
    By hishamezzat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2018, 05:31 PM
  3. [SOLVED] Copy Paste From Rawdata Sheets to Multiple Sheets Based on Sheet names
    By farrukh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-16-2017, 11:01 PM
  4. [SOLVED] loop copy & paste visible Ws only without hidden sheets to new Wb
    By Pi* in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-31-2017, 11:42 PM
  5. [SOLVED] copy and paste values of all sheets into new sheets
    By greatjobtoday in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-20-2012, 01:44 PM
  6. macro copy paste on protect sheets and hidden within the same workbook
    By Birnen in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-30-2010, 02:18 PM
  7. copy and pasting in hidden sheets
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-04-2008, 11:34 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