2022-10-06

anond:20221006214750

そうなんだ。

ちょっと調べたわ。

本筋と関係ないけど、戻り値

If MultiSelect is True, the return value is an array of the selected file names (even if only one file name is selected). Returns False if the user cancels the dialog box.

https://learn.microsoft.com/en-us/office/vba/api/excel.application.getopenfilename

ダイアログキャンセルするとFalseが返ってくるからIsArray()とかでガードした方が良いかもな。

あとは、用途に合うようならFor文じゃなくてFor Each文使うのも良いかもね。

記事への反応(ブックマークコメント)

ログイン ユーザー登録
ようこそ ゲスト さん