hi all,
i would like to take a collection of sheets
ie
sheets(array("sheet1","sheet2")).select
and change all of their page setup properties simultaneously
i am having difficulty figuring out how to do this.
each time i try, it seems to only change the attributes of the currently selected sheet rather than the entire array
my exact current code is
Sheets(Array("Portfolio", "Portfolio Summary", "Trade 1", "Trade 2", "Trade 3", "Query 1", "Query 2", "Query 3", "Query 4", "Query 5", "Query 6", "Query 7", "Vol - Summary", "Vol - Individual")).Select
With ActiveSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.25)
.BottomMargin = Application.InchesToPoints(0.75)
.CenterFooter = "Page &P"
.RightFooter = "&Z&F"
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
.FirstPageNumber = xlAutomatic
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 100
End With
do you see where i am going wrong? thanks
i would like to take a collection of sheets
ie
sheets(array("sheet1","sheet2")).select
and change all of their page setup properties simultaneously
i am having difficulty figuring out how to do this.
each time i try, it seems to only change the attributes of the currently selected sheet rather than the entire array
my exact current code is
Sheets(Array("Portfolio", "Portfolio Summary", "Trade 1", "Trade 2", "Trade 3", "Query 1", "Query 2", "Query 3", "Query 4", "Query 5", "Query 6", "Query 7", "Vol - Summary", "Vol - Individual")).Select
With ActiveSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.25)
.BottomMargin = Application.InchesToPoints(0.75)
.CenterFooter = "Page &P"
.RightFooter = "&Z&F"
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
.FirstPageNumber = xlAutomatic
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 100
End With
do you see where i am going wrong? thanks