With xlsheet.PageSetup
.Orientation = xlLandscape '横向
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.4)
.BottomMargin = Application.InchesToPoints(0.4)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
End With
-----------------
以上是对EXCEL的页面设置,但是在VB运行里不通过。请问要如何设置页边距这些值呢。
我想装左右页边距都设成0.25。
直接写 .LeftMargin = 0.25 也是错误的。有人会吗?