Excel VBA - Copy worksheet to a new workbook and save without formatting and formulas

Поділитися
Вставка
  • Опубліковано 5 вер 2022
  • How to copy worksheet to a new workbook in VBA?
    How to save a workbook using the name of the existing worksheet?
    How to transfer a worksheet to a new workbook and save as pasted values (no formats and formulas)?
    Functions:
    1. For Each ws In ActiveWorkbook.Worksheets
    2. ws.Copy
    3. ActiveWorkbook.Sheets(1).Cells.ClearFormats
    4. ActiveWorkbook.Sheets(1).Cells.Copy
    5. ActiveWorkbook.Sheets(1).Cells.PasteSpecial Paste:="PUT THE PASTE TYPE HERE"
    6. ActiveWorkbook.SaveAs Filename:="PASTE YOUR PATH HERE\" & ActiveSheet.Name & ".xlsx"
    7. ActiveWorkbook.Close
    Remark: to save as "Macro-Enabled" workbook, use ".xlsm".
    Editable template available for free download 👉 / 647285926728620
    Excel & VBA discussion public group 👉 / 486402069483674
    Welcome to join and feel free to raise/ask questions (if any) or share Excel tricks 🤗

КОМЕНТАРІ •