01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20 |
|
Sub Dateiauswahl()
Dim sPath As String, sFile As String
sPath = "C.\testimport\"
sFile = "MeineDatei12345.txt" ' Oder aus Feld übernehmen
With Application.FileDialog(msoFileDialogFilePicker)
.Title = "Wähle eine Datei aus"
.Filters.Add "Text File", "*.txt"
.FilterIndex = 1
.AllowMultiSelect = False
.InitialFileName = sPath & sFile
If .Show <> 0 Then
sFile = Trim(.SelectedItems.Item(1))
Else
MsgBox "Der Auswahlprozess wurde abgebrochen", vbExclamation, "Dateiauswahl"
End If
End With
End Sub
|