背景に画像を表示(SetBackgroundPicture メソッド)
2016/01/12
SetBackgroundPicture メソッド
SetBackgroundPicture メソッド を使用するとワークシートの背景に画像を敷き詰めて表示することができます。この画像は印刷されません。
object.SetBackgroundPicture ( filename )
引数・戻り値
- object ・・・ 対象となる Worksheet オブジェクトを指定します。
- filename ・・・ 表示する画像ファイルを指定します。
指定した画像を削除するには、SetBackgroundPicture メソッド の引数 filename に、””(空の文字列)を指定します。
(例)ActiveSheet.SetBackgroundPicture (“”)
SetBackgroundPicture メソッド 使用例
サンプルVBAソース
|
1 2 3 4 5 6 7 8 |
Sub Sample_SetBackgroundPicture() 'アクティブシートの背景に画像を表示 ActiveSheet.SetBackgroundPicture ("C:\Users\Documents\sample.jpg") End Sub |
実行結果
関連記事
-
-
印刷設定(ヘッダー・フッターに画像を設定)Graphic オブジェクト
Graphic オブジェクト Graphic オブジェクト は、ヘッダーおよびフ …
-
-
印刷設定(ヘッダーに画像を指定)LeftHeaderPicture, CenterHeaderPicture, RightHeaderPicture
ヘッダーに画像を表示するには LeftHeaderPicture プロパティ、C …
-
-
ワークシートを参照する(Sheets プロパティ)
Sheets プロパティ Sheets プロパティは、Sheets コレクション …
-
-
ウィンドウを拡大・縮小(Zoom プロパティ)
ウィンドウを拡大・縮小(Zoom プロパティ) ウィンドウの表示サイズをパーセン …
-
-
前後のワークシートを参照する(Previous プロパティ,Next プロパティ)
Previous プロパティ 指定したシートの前(左側)のシートを参照します。 …
-
-
印刷設定(フッターに画像を指定)LeftFooterPicture,CenterFooterPicture,RightFooterPicture
フッターに画像を表示するには LeftFooterPicture プロパティ、C …
-
-
ユーザー設定のドキュメントプロパティ(CustomDocumentProperties プロパティ)
CustomDocumentProperties プロパティ ユーザー設定のドキ …
-
-
ステータスバーにメッセージを表示(StatusBar プロパティ)
StatusBar プロパティ StatusBar プロパティで、ステータスバー …
-
-
WorksheetView オブジェクト
WorkSheetView オブジェクト 行列番号や枠線の表示・非表示の設定など …
-
-
印刷位置を中央に設定(CenterHorizontally, CenterVertically)
PageSetup.CenterHorizontally プロパティ PageS …
