Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-01-2018, 08:04 AM
@MacroZinck @MacroZinck is offline Copy Sheets to New Workbook BUT Keeping Format Windows 7 64bit Copy Sheets to New Workbook BUT Keeping Format Office 2013
Novice
Copy Sheets to New Workbook BUT Keeping Format
 
Join Date: Feb 2018
Posts: 1
@MacroZinck is on a distinguished road
Default Copy Sheets to New Workbook BUT Keeping Format

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

Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Sheets to New Workbook BUT Keeping Format 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
Copy Sheets to New Workbook BUT Keeping Format How add 3 footer items to all sheets in workbook? Mendopaul Excel 3 12-05-2013 02:32 PM
Copy Sheets to New Workbook BUT Keeping Format Combining 2 workbooks into 1 workbook with TWO sheets dguenther Excel 1 10-06-2011 03:25 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft