Sub ki238() fff = Application.GetOpenFilename(Title:="ファイル指定") i = InStrRev(fff, ".") ext = Mid(fff, i) MsgBox "このファイルの拡張子は " & ext & " です" End Sub