背景に画像を表示(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 |
実行結果
関連記事
-
-
印刷設定(フッターに画像を指定)LeftFooterPicture,CenterFooterPicture,RightFooterPicture
フッターに画像を表示するには LeftFooterPicture プロパティ、C …
-
-
指定したセル範囲が含まれるワークシートを参照する(Worksheet プロパティ)
Worksheet プロパティ Worksheet プロパティは、指定したセル範 …
-
-
ファイル保存の既定の形式を取得・設定(DefaultSaveFormat プロパティ)
DefaultSaveFormat プロパティ DefaultSaveForma …
-
-
セルのコメントを印刷(PageSetup.PrintComments プロパティ)
PageSetup.PrintComments プロパティ PageSetup. …
-
-
数式を表示(DisplayFormulas プロパティ)
数式を表示(DisplayFormulas プロパティ) セルに数式が入力されて …
-
-
ブックを保存する(Save メソッド)
ブックを保存する(Save メソッド) 既存のブックを上書き保存するには、Sav …
-
-
Excel を全画面表示(DisplayFullScreen プロパティ)
DisplayFullScreen プロパティ DisplayFullScree …
-
-
ウィンドウを拡大・縮小(Zoom プロパティ)
ウィンドウを拡大・縮小(Zoom プロパティ) ウィンドウの表示サイズをパーセン …
-
-
アクティブプリンタを変更(ActivePrinter プロパティ)
ActivePrinter プロパティ ActivePrinter プロパティを …
-
-
並べて比較(CompareSideBySideWith,SyncScrollingSideBySide,BreakSideBySide)
並べて比較(CompareSideBySideWith メソッド) Compar …
