ExcelWork.info

Excel(エクセル)のマクロ・VBA・関数・操作などのメモ

印刷する用紙の向きを設定(PageSetup.Orientation プロパティ)

   

PageSetup.Orientation プロパティ

PageSetup.Orientation プロパティで、印刷する用紙の向きを設定することができます。値の取得および設定が可能で、XlPageOrientation 列挙型 の定数を使用します。


【書式】

<取得>
object.PageSetup.Orientation

<設定>
object.PageSetup.Orientation = const


引数・戻り値

  • object  ・・・  対象となる Worksheet オブジェクト を指定します。
  • const  ・・・  印刷用紙の向きが縦か横を表す XlPageOrientation 列挙型 の定数またはその値を指定します。
    定数 内容
    xlPortrait 1 用紙の向きを縦に設定
    xlLandscape 2 用紙の向きを横に設定



PageSetup.Orientation プロパティ 使用例

サンプルVBAソース


実行結果

PageSetup.Orientation プロパティ 使用例


 - ブック・シートの操作 , , , , , , ,

Message

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

  関連記事

ブックが共有モードか確認する(MultiUserEditing プロパティ)

ブックが共有モードか確認する(MultiUserEditing プロパティ) 共 …

WorksheetView オブジェクト

WorkSheetView オブジェクト 行列番号や枠線の表示・非表示の設定など …

ワークシートの数を数える(Count プロパティ)

Count プロパティ 指定したWorksheets コレクションやSheets …

余白・ヘッダー
印刷:余白を設定 TopMargin,BottomMargin,LeftMargin,RightMargin,HeaderMargin,FooterMargin

余白を設定する 余白を設定する単位は、pt(ポイント:約 0.03528 cm) …

PrintCommunication プロパティ 使用例
印刷設定を高速化(PrintCommunication プロパティ)

PrintCommunication プロパティ PrintCommunicat …

再計算の設定・実行
再計算(Calculation, EnableCalculation, Calculate)

ワークブックやシートの再計算 通常、Excel では、自動的に再計算が行われる設 …

印刷設定(フッターに文字列を指定)LeftFooter,CenterFooter,RightFooter

PageSetup.LeftFooter プロパティ PageSetup.Lef …

ブックのプロパティ(BuiltinDocumentProperties プロパティ)

BuiltinDocumentProperties プロパティ ブックのプロパテ …

Excel8CompatibilityMode プロパティ
ブックが互換モードで開いているか確認する(Excel8CompatibilityMode プロパティ)

ブックが互換モードで開いているか確認する Excel8Compatibility …

Excel を全画面表示(DisplayFullScreen プロパティ)

DisplayFullScreen プロパティ DisplayFullScree …