半角チルダ

ExcelVBA、その他。
覚え書きや、補足資料などのスクラップブック。
end-u(1037781)

■Dialogs(xlDialogInsertPicture)の引数

2008-10-20 21:00:00 | 雑記
Application.Dialogs(xlDialogInsertPicture)...図の挿入ダイアログの事ですが、先日の xlDialogFilter の記事とは逆で、ヘルプに引数の記載はありますが、実際には機能しません。

(ヘルプの引数)
xlDialogInsertPicture file_name、filter_number

不勉強な私が知らないだけかもしれませんが、どうやっても file_name、filter_number が反映しないです。

Dim v
v = "sample.jpg"
'v = "d:¥tmp¥sample.jpg"
Application.Dialogs(xlDialogInsertPicture).Show v, 0 '1



バージョンアップの際のヘルプの修正忘れか何かでしょうかねぇ...


ついでに。
Dialog オブジェクトの Show メソッドの引数を、名前付きで使用したい場合は arg1,arg2...で使用できます。

Application.Dialogs(xlDialogSort).Show arg1:=xlTopToBottom, _
                    arg2:="列 A", _
                    arg3:=xlAscending, _
                    arg8:=xlNo
Comment
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする