ページ設定-余白タブ
Sub file_pagesetup_margin()
With ActiveSheet.Pagesetup
.TopMargin = Application.InchesToPoints(0.984)
'上の余白をインチ単位で設定
.LeftMargin = Application.InchesToPoints(0.787)
'左の余白
.RightMargin = Application.InchesToPoints(0.787)
'右の余白
.BottomMargin = Application.InchesToPoints(0.984)
'下の余白
.HeaderMargin = Application.InchesToPoints(0.512)
'ヘッダの余白
.FooterMargin = Application.InchesToPoints(0.512)
'フッタの余白
'センチ単位で指定する場合はCentimetersToPointsを使います
'ページ中央
'水平
.CenterHorizontally = True
'垂直
.CenterVertically = True
End With
End Sub
Cyber Click!