I want to copy the page setup of sheet1 to all 50 sheets in my workbook. To do so, I am attempting to run the following code:
sub Print_Adjust()
Dim i As Integer
Dim sheetname As Variant
i = 1
Do
sheetname = “sheet” & i
sheetname.Activate
With ActiveSheet.PageSetup
‘Page Setup Code Here
End With
i = i + 1
loop while i < 50
end sub
It's telling me object required, yet the sheetname variable contains the proper syntax, 'Sheet1'… Any suggestions?
Thanks!