DCrake
Remembered
- Local time
- Today, 13:55
- Joined
- Jun 8, 2005
- Messages
- 8,626
This has been discussed to death but has a final relsolution been reached?
I want to use a filesearch in 2007 my previous code was
However it falls over on the red line
I do not want to use the CommonDialog component but I want to be able to allow different filter types. Has anyone got a solution please.
I want to use a filesearch in 2007 my previous code was
Code:
Dim Example As Integer
[COLOR="Red"]Dim dlg As FileDialog[/COLOR]
Set dlg = Application.FileDialog(msoFileDialogFilePicker)
With dlg
.Title = "Select the database file to open"
.AllowMultiSelect = False
.Filters.Clear
.Filters.Add "Access 2000/2003", "*.mdb", 1
.Filters.Add "Access 2007/2010", "*.accdb", 2
.Filters.Add "All Files", "*.*", 3
If .Show = -1 Then
StrFileName = .SelectedItems(1)
End If
End With
However it falls over on the red line
I do not want to use the CommonDialog component but I want to be able to allow different filter types. Has anyone got a solution please.