いくつかのセルをフォーマットし、いくつかのページフォーマットを設定するために記録された単純なマクロがあります(マージンフッターヘッダーなど)。マクロはエラーなしで実行され、セルを正常にフォーマットしますが、ページ設定を保存/変更しませんオプション。実行した後、ページ設定を確認すると、すべてがデフォルトのままです。以下はページ設定部分です。複数のファイル/ワークブックでこれを試しましたが、何があっても変更が保存されないようです。何か案は?
ありがとう
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = "&F"
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = "Page &P of &N"
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
.PrintGridlines = True
.Orientation = xlLandscape
.FirstPageNumber = xlAutomatic
.FitToPagesWide = 1
End With