白黒印刷(PageSetup.BlackAndWhite プロパティ)
PageSetup.BlackAndWhite プロパティ
PageSetup.BlackAndWhite プロパティ を True に設定すると白黒で印刷します。値の取得および設定が可能です。
【書式】
<取得>
object.PageSetup.BlackAndWhite
<設定>
object.PageSetup.BlackAndWhite = boolean
引数・戻り値
- object ・・・ 対象となる Worksheet オブジェクト を指定します。
- boolean ・・・ True に設定すると対象となるオブジェクト( object )を白黒で印刷します。
PageSetup.BlackAndWhite プロパティ 使用例
サンプルVBAソース
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
Sub Sample_PageSetupBlackAndWhite() Dim w As Worksheet Set w = ActiveSheet With w '印刷範囲を設定 .PageSetup.PrintArea = "B1:J26" '白黒で印刷 .PageSetup.BlackAndWhite = True '印刷プレビューを表示 .PrintPreview End With End Sub |
実行結果
サンプルVBAソース 実行前
実行後
関連記事
-
-
ワークシートをアクティブにする・選択する(Activate, Select)
Activate メソッド・Select メソッド Activate メソッドは …
-
-
ウィンドウのタイトル(Window.Caption プロパティ)
ウィンドウのタイトル(Caption プロパティ) Windows.Captio …
-
-
ワークシートの追加・削除(Add メソッド・Delete メソッド)
新しいワークシートを作成 Add メソッドで、新しいワークシートを指定した場所に …
-
-
ワークシートにクリップボードの内容を貼り付ける(Paste メソッド)
Paste メソッド 指定したワークシート上にクリップボードのデータを貼り付けま …
-
-
ステータスバーにメッセージを表示(StatusBar プロパティ)
StatusBar プロパティ StatusBar プロパティで、ステータスバー …
-
-
イベントの発生・無効をコントロール(EnableEvents プロパティ)
EnableEvents プロパティ EnableEvents プロパティに T …
-
-
印刷位置を中央に設定(CenterHorizontally, CenterVertically)
PageSetup.CenterHorizontally プロパティ PageS …
-
-
ブックの表示・非表示(Visible プロパティ)
ブック表示・非表示(Visible プロパティ) ブック(ウィンドウ)が表示され …
-
-
0 を表示するかどうかを設定(DisplayZeros プロパティ)
DisplayZeros プロパティ DisplayZeros プロパティに、T …
-
-
アクティブプリンタを変更(ActivePrinter プロパティ)
ActivePrinter プロパティ ActivePrinter プロパティを …

