背景に画像を表示(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 |
実行結果
関連記事
-
-
分割したウィンドウの取得(Panes コレクション,Pane オブジェクト)
分割したウィンドウ 「ウィンドウ枠の固定」や「ウィンドウの分割」での、すべての領 …
-
-
ウィンドウのタイトル(Window.Caption プロパティ)
ウィンドウのタイトル(Caption プロパティ) Windows.Captio …
-
-
印刷設定(フッターに画像を指定)LeftFooterPicture,CenterFooterPicture,RightFooterPicture
フッターに画像を表示するには LeftFooterPicture プロパティ、C …
-
-
印刷:余白を設定 TopMargin,BottomMargin,LeftMargin,RightMargin,HeaderMargin,FooterMargin
余白を設定する 余白を設定する単位は、pt(ポイント:約 0.03528 cm) …
-
-
ブックの変更が保存されているかを確認する(Saved プロパティ)
ブックの変更が保存されているかを確認する(Saved プロパティ) Saved …
-
-
印刷設定(フッターに文字列を指定)LeftFooter,CenterFooter,RightFooter
PageSetup.LeftFooter プロパティ PageSetup.Lef …
-
-
印刷設定を高速化(PrintCommunication プロパティ)
PrintCommunication プロパティ PrintCommunicat …
-
-
アクティブシートを参照する(ActiveSheet プロパティ)
アクティブなワークシートを参照する ActiveSheet プロパティを使用する …
-
-
ワークシートをアクティブにする・選択する(Activate, Select)
Activate メソッド・Select メソッド Activate メソッドは …
-
-
ウィンドウの位置を入れ替える(ActivatePrevious メソッド、ActivateNext メソッド)
ウィンドウの位置を入れ替える ActivatePrevious メソッド、Act …
