ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need macro to copy active sheet to a new workbook (https://www.excelbanter.com/excel-programming/410454-need-macro-copy-active-sheet-new-workbook.html)

Bill_S

Need macro to copy active sheet to a new workbook
 
My workbook is protected so the user is prevented from adding/delete sheets.
I need a macro that:

-unprotects the workbook
-copies the active sheet (as values) to a new workbook*
-reprotects the workbook
-activates the new workbook

*The reason I want the entire sheet copied and not just all cells, is
because the exact cell formatting and print formatting needs to be preserved
in the new workbook.

Don Guillett

Need macro to copy active sheet to a new workbook
 
The macro recorder is your friend. Try it and then post back for comments to
improve.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Bill_S" wrote in message
...
My workbook is protected so the user is prevented from adding/delete
sheets.
I need a macro that:

-unprotects the workbook
-copies the active sheet (as values) to a new workbook*
-reprotects the workbook
-activates the new workbook

*The reason I want the entire sheet copied and not just all cells, is
because the exact cell formatting and print formatting needs to be
preserved
in the new workbook.




All times are GMT +1. The time now is 04:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com