![]() |
|
|
|
#1
|
|||
|
|||
|
Hi,
Would need help please with the simple macro below. It's a macro that copies a selection of worksheets to a new workbook and save it in a name indicated in the macro (e.g. 'France'). I'd like to add code lines for two purposes: 1. Keep the formatting of the original sheets in the newly created workbook 2. Set the view zoom to 55% for all sheets. Would anyone help, please? Thanks, Code:
Sub CreateGroupFiles()
Dim TheActiveWindow As Window
'Dim TempWindow As Window
'France
With ActiveWorkbook
Set TheActiveWindow = ActiveWindow
.Sheets(Array("France", "_frly_o", "_frpac_o", "_frpad_o", "_frpacw_o)).Copy
ActiveWorkbook.SaveAs Filename:="\\Sheets" & "\France.xlsx"
ActiveWorkbook.Close
End With
'Germany
With ActiveWorkbook
Set TheActiveWindow = ActiveWindow
.Sheets(Array("Germany", "_debe_o", "_dedu_o", "_defr_o", "_deha_o")).Copy
ActiveWorkbook.SaveAs Filename:="\\Sheets" & "\Germany.xlsx"
ActiveWorkbook.Close
End With
End Sub
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
One macro to sort individual sheets in a workbook
|
darbybrown | Excel Programming | 1 | 09-11-2016 12:51 PM |
| Moving cell data between sheets in a workbook | Little Mike | Excel | 5 | 05-05-2016 06:22 AM |
| automatically copy FIRST COLUMN ONLy to all sheets in workbook | nrcahill | Excel | 1 | 03-14-2016 12:26 PM |
How add 3 footer items to all sheets in workbook?
|
Mendopaul | Excel | 3 | 12-05-2013 02:32 PM |
Combining 2 workbooks into 1 workbook with TWO sheets
|
dguenther | Excel | 1 | 10-06-2011 03:25 AM |