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

Ah Sing Excel TV
Ah Sing Excel TV
3.6 هزار بار بازدید - 2 سال پیش - How to copy worksheet to
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 👉 Facebook: 647285926728620

Excel & VBA discussion public group 👉 Facebook: 486402069483674
Welcome to join and feel free to raise/ask questions (if any) or share Excel tricks 🤗
2 سال پیش در تاریخ 1401/06/15 منتشر شده است.
3,678 بـار بازدید شده
... بیشتر