Why Doesn't This Work? (Page Setup)

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
 
D

Dave Peterson

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
 
E

EricG

That's what I did. It's just slow and frustrating, but it works.

Thanks for you response,

Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top