SBendBuckeye
Programmer
Hello All,
I am getting Error 438 - "Object doesn't support this property or method" when trying to set the Filters property when setting up the Application.FileDialog object. I get the error even when using code I copied and pasted right out of the Help example. Everything else is working perfectly. Below is my code with some other properties which are working included. The problem parts are in red. It is part of a function named PopRequestedDialog.
Thanks in advance for any help, ideas and/or suggestions!
Have a great day!
j2consulting@yahoo.com
I am getting Error 438 - "Object doesn't support this property or method" when trying to set the Filters property when setting up the Application.FileDialog object. I get the error even when using code I copied and pasted right out of the Help example. Everything else is working perfectly. Below is my code with some other properties which are working included. The problem parts are in red. It is part of a function named PopRequestedDialog.
Thanks in advance for any help, ideas and/or suggestions!
Code:
With Application.FileDialog(DialogType)
If Not IsMissing(TitleText) Then
.Title = Trim$(TitleText)
End If
If Not IsMissing(InitialFileName) Then
.InitialFileName = InitialFileName
End If
'Clear last set of filters
.Filters.Clear
[COLOR=red]
'This is a copy and paste right out of Help
.Filters.Add Description:="All files", _
Extensions:="*.*"
'Also a copy and paste right out of Help
'Add a filter that includes GIF and JPEG
'images and make it first item in the list
.Filters.Add "Images", _
"*.gif; *.jpg; *.jpeg", 1
[/color]
If Not IsMissing(FilterIndex) Then
.FilterIndex = FilterIndex
End If
.AllowMultiSelect = AllowMultiSelect
If .Show Then
PopRequestedDialog = True
Set SelectedItems = .SelectedItems
Else
'User pressed Cancel
PopRequestedDialog = False
End If
End With
Have a great day!
j2consulting@yahoo.com