Windows VB ワークシートの作成 part2 Worksheets.pageSetup

Windows Visual Basic において ワークシートの作成 とは以下を示します。

ワークシートの作成 ページの設定

  Function pageSetup(sOutputFileName As String,
                     sWorksheetName As Variant,
                     iPrintDirection As Integer,
                     sPrintArea As String)

    Workbooks(sOutputFileName).
    Worksheets(sWorksheetName).Activate

    With Worksheets(sWorksheetName).pageSetup
      .LeftHeader = "&F"
      ' .CenterHeader = ""
      .RightHeader = "印刷日:&D"
      .LeftFooter = "開示:xxx"
      .CenterFooter = "&P/&N"
      .RightFooter = "(C)xxx"
      ' .LeftMargin = Application.InchesToPoints(0.787)
      ' .RightMargin = Application.InchesToPoints(0.787)
      ' .TopMargin = Application.InchesToPoints(0.984)
      ' .BottomMargin = Application.InchesToPoints(0.984)
      ' .HeaderMargin = Application.InchesToPoints(0.512)
      ' .FooterMargin = Application.InchesToPoints(0.512)
      ' .PrintHeadings = False
      ' .PrintGridlines = False
      ' .PrintComments = xlPrintNoComments
      ' .PrintQuality = 600
      ' .CenterHorizontally = False
      ' .CenterVertically = False
      ' .Orientation = xlLandscape
      .Orientation = iPrintDirection
      .PrintArea = sPrintArea   '←引数
      ' .Draft = False
      ' .PaperSize = xlPaperA4
      ' .FirstPageNumber = xlAutomatic
      ' .Order = xlDownThenOver
      ' .BlackAndWhite = False
      ' .Zoom = 100
      ' .PrintErrors = xlPrintErrorsDisplayed
    End With
  End Function

ご訪問頂き有難う御座います。 当サイトを効率良く使うためにまずは FrontPage を見て下さい。 検索方法、一覧表示などの各情報を纏めています。
当サイトの説明 → Frontpage