PDA

View Full Version : VBA Excel Margin Problem



cwleecw
03-10-2011, 03:00 AM
Hi all,

I have several line of codes to change the "Page set up" properities of my report.

With ActiveSheet.PageSetup
.PrintArea = ""
.LeftFooter = "XXX"
.RightFooter = "YYY"
.LeftMargin = Application.InchesToPoints(0.2)
.RightMargin = Application.InchesToPoints(0.2)
.TopMargin = Application.InchesToPoints(0.2)
.BottomMargin = Application.InchesToPoints(0.32)
.HeaderMargin = Application.InchesToPoints(0.05)
.HeaderMargin = Application.InchesToPoints(0.2)
.FooterMargin = Application.InchesToPoints(0.27)
End With

It works perfectly well with my notebook as well as my colleagues's notebooks. However, when it comes to my Boss's notebook, the set up of margin just doesnt work !!! (Left Footer and Right Footer both work).

Can anyone help me to get ride of this frustration.

Thanks.

Regards,
Chris