0
私は単純な縦向きから横向きに変更するExcelマクロ(下記)を持っています。 Excelの "レコードマクロ"ツールを使用しましたが、このマクロを使用するとコマンドを無視します。他に誰がこれを見たことがありますか?そして、良い解決策はありますか?あなたはこの全体から必要なだけの行が記録されたマクロExcel VBA PageSetupの変更を無視する
Sub Writedown_Format_Landscape()
'
' Writedown_Format_Landscape Macro
Range("A1").Select
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
.PrintTitleColumns = ""
End With
Application.PrintCommunication = True
ActiveSheet.PageSetup.PrintArea = ""
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.LeftHeader = "&D - &T"
.CenterHeader = "&F"
.RightHeader = "&P/&N"
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.25)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
.PrintHeadings = False
.PrintGridlines = True
.PrintComments = xlPrintNoComments
.CenterHorizontally = True
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
Range("A1").Select
End Sub