Code Snippet "VBA Excel"
Dialogfenster "Datei öffnen" liefert Dateinamen zurück und fängt Abbrechen ab
Function getImportFilename() As String
Dim Filename As String
Dim Tmp As Variant
Tmp = Application.GetOpenFilename("Excel, *.xls", 1, "Import Excel Workbook", "OK", False)
If VarType(Tmp) = vbBoolean Then
Filename = ""
Else
Filename = "" & Tmp
End If
getImportFilename = Filename
End Function