背景に画像を表示(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 …
-
-
ウィンドウの分割(Split プロパティ,SplitColumn プロパティ,SplitRow プロパティ)
ウィンドウの分割と解除 ウィンドウ(ワークシート画面)を分割するには、Split …
-
-
印刷設定(ヘッダー/フッター)書式コード・VBAコード
印刷設定(ヘッダー/フッター)書式コード・VBAコード ヘッダーおよびフッター( …
-
-
数式を表示(DisplayFormulas プロパティ)
数式を表示(DisplayFormulas プロパティ) セルに数式が入力されて …
-
-
印刷時、シート内のエラーをどう扱うかを設定(PrintErrors プロパティ)
PageSetup.PrintErrors プロパティ PageSetup.Pr …
-
-
指定された情報をブックから削除(RemoveDocumentInformation メソッド)
RemoveDocumentInformation メソッド 指定された種類の情 …
-
-
ワークシートの数を数える(Count プロパティ)
Count プロパティ 指定したWorksheets コレクションやSheets …
-
-
印刷位置を中央に設定(CenterHorizontally, CenterVertically)
PageSetup.CenterHorizontally プロパティ PageS …
-
-
シート見出しの表示・非表示(DisplayWorkbookTabs プロパティ)
シート見出しの表示・非表示(DisplayWorkbookTabs プロパティ) …
-
-
並べて比較(CompareSideBySideWith,SyncScrollingSideBySide,BreakSideBySide)
並べて比較(CompareSideBySideWith メソッド) Compar …
