背景に画像を表示(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 |
実行結果
関連記事
-
-
ブックのパスを取得(FullName プロパティ,Path プロパティ)
FullName プロパティ・Path プロパティ ブックのパス(保存場所)を調 …
-
-
イベントの発生・無効をコントロール(EnableEvents プロパティ)
EnableEvents プロパティ EnableEvents プロパティに T …
-
-
ウィンドウを拡大・縮小(Zoom プロパティ)
ウィンドウを拡大・縮小(Zoom プロパティ) ウィンドウの表示サイズをパーセン …
-
-
最近使用したファイル(RecentFile オブジェクト,RecentFiles コレクション)
最近使用したファイル(RecentFile オブジェクト,RecentFiles …
-
-
ワークシートにクリップボードの内容を貼り付ける(Paste メソッド)
Paste メソッド 指定したワークシート上にクリップボードのデータを貼り付けま …
-
-
ウィンドウを整列(Windows.Arrange メソッド)
ウィンドウを整列(Windows.Arrange メソッド) Windows コ …
-
-
ブックのプロパティ(BuiltinDocumentProperties プロパティ)
BuiltinDocumentProperties プロパティ ブックのプロパテ …
-
-
シート見出しの表示・非表示(DisplayWorkbookTabs プロパティ)
シート見出しの表示・非表示(DisplayWorkbookTabs プロパティ) …
-
-
ブックの表示を変更(View プロパティ)
ブックの表示を変更(View プロパティ) View プロパティ で、ブックの表 …
-
-
数式を表示(DisplayFormulas プロパティ)
数式を表示(DisplayFormulas プロパティ) セルに数式が入力されて …
