Sub Upload_Click()
Dim dlg As FileDialog
Dim FileSelected As String
Set dlg = Application.FileDialog(msoFileDialogFilePicker)
With dlg
.title = "Select the Excelfile to import"
.AllowMultiSelect = False
.Filters.Clear
.Filters.Add "Excel Files", "*.xls*", 1
.Filters.Add "All Files", "*.*", 2
If .Show = -1 Then
FileSelected = .SelectedItems(1)
Else
Exit Sub
End If
End With
Sheet4.TextBox1.Value = FileSelected
End Sub
Dim dlg As FileDialog
Dim FileSelected As String
Set dlg = Application.FileDialog(msoFileDialogFilePicker)
With dlg
.title = "Select the Excelfile to import"
.AllowMultiSelect = False
.Filters.Clear
.Filters.Add "Excel Files", "*.xls*", 1
.Filters.Add "All Files", "*.*", 2
If .Show = -1 Then
FileSelected = .SelectedItems(1)
Else
Exit Sub
End If
End With
Sheet4.TextBox1.Value = FileSelected
End Sub