Why Doesn't This Work? (Page Setup)

  • Thread starter Thread starter EricG
  • Start date Start date
E

EricG

I have this working the long way (using each separate component of the page
setup object). Why doesn't the code below work? Seems like it should.

Sub Set_Page_Setup(wsh1 as Worksheet, wsh2 as Worksheet)
Set wsh1.PageSetup = wsh2.PageSetup
End Sub

Thanks,

Eric
 
It would make life a lot easier if it did.

But you'll have to grab the individual properties that you want.

with wsh1.PageSetup
.LeftHeader = wsh2.pagesetup.leftheader
.centerHeader = wsh2.pagesetup.centerheader
'and on and on...
end with
 
That's what I did. It's just slow and frustrating, but it works.

Thanks for you response,

Eric
 
Back
Top