I'm using the code below inside a WORD macro.
When I try to run another macro opening another filetype the selection is restricted to the xls-files defined in the previous macro
How do I reset the filters of the msoFileDialogFilePicker at the end of the macro ?
When I try to run another macro opening another filetype the selection is restricted to the xls-files defined in the previous macro
How do I reset the filters of the msoFileDialogFilePicker at the end of the macro ?
Code:
Dim fd As FileDialog
' select excel-file
Set fd = Application.FileDialog(msoFileDialogFilePicker)
fd.Title = "Selecting Excel Result File"
fd.InitialFileName = ExcelResultDir
fd.InitialView = msoFileDialogViewList
fd.Filters.Clear
fd.Filters.Add "Excel-files", "*.xls*"
fd.FilterIndex = 1
fd.ButtonName = "Choose &This file"
If fd.Show <> -1 Then
MsgBox "Macro stopped without selecting a Excel Result File"
Exit Sub
End If