Hi,
I'm trying to set the filters on the filedialog as per the help example..
But when I use this syntax...
.Filters.Clear errors with "Object doesn't support this property or method"
Any ideas why I'm getting this error that contradicts the MS help for this FileDialog object?
Thanks,
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
I'm trying to set the filters on the filedialog as per the help example..
' Set up the File Dialog.
Set fDialog = Application.FileDialog(msoFileDialogFilePicker)
With fDialog
' Allow user to make multiple selections in dialog box
.AllowMultiSelect = True
' Set the title of the dialog box.
.Title = "Please select one or more files"
' Clear out the current filters, and add our own.
.Filters.Clear
.Filters.Add "Access Databases", "*.MDB"
.Filters.Add "Access Projects", "*.ADP"
.Filters.Add "All Files", "*.*"
But when I use this syntax...
Code:
Set fd = Application.FileDialog(msoFileDialogSaveAs)
If Not IsMissing(cFilters) Then
With fd
.Filters.Clear
For Each vFilter In cFilters.keys
.Filters.Add cFilters.Item(vFilter), vFilter
Next
End With
End If
.Filters.Clear errors with "Object doesn't support this property or method"
Any ideas why I'm getting this error that contradicts the MS help for this FileDialog object?
Thanks,
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music