I have a workbook currently with 1 worksheet in - it has a macro that creates a series of new sheets and what I would like is to have the page set up copied from the sheet currently called sheet1 to all the new sheets (could be any number up to 20 created depending on what data is on sheet 1)
I have used this before to copy to orientation but don't know how to change it to copy all the page set up ie zoom, margin, etc etc.
I have used this before to copy to orientation but don't know how to change it to copy all the page set up ie zoom, margin, etc etc.
HTML:
Sub SetWorkbookAttributes()
For Each xWorksheet In ActiveWorkbook.Worksheets
xWorksheet.PageSetup.Orientation = _
ThisWorkbook.Worksheets("Sheet1").PageSetup.Orientation
Next xWorksheet
End Sub
[HTML]
Hope that makes some sense and any help appreciated