0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

getopenfilename

Last updated at Posted at 2021-02-12

getopenfilenameについて
##getopenfiename

複数の拡張子を使いたい場合は、FileFilterをうまく利用する。

'test.xlsm

Dim listfile As Variant

listfile = Application.GetOpenFilename(FileFilter:="CSVファイル,*.csv,xlsxファイル, _
*.xlsx", FilterIndex:=2, Title:="選択してください,")
    If VarType(listfile) = vbBoolean Then
        MsgBox "キャンセルされました"
        Exit Sub
    End If    
End Sub
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?