Dim objFileDialog As Office.FileDialog Dim varFile As Variant Set objFileDialog = Application.FileDialog(msoFileDialogFilePicker) With objFileDialog 'Multiselect is the default .AllowMultiSelect = False .Title = "Choose the file to be imported" .Filters.Clear .Filters.Add "Text files", "*.txt" .Filters.Add "All Files", "*.*" 'If user cancels, Show will be false If .Show = True Then Me!txtFilePath = .SelectedItems(1) End If End With