VBAGrandpa
Technical User
Hi everyone!
I have been scratching my head over this simple problem for too long. Here's my VBA code (in Excel 2002):
With Application.FileDialog(msoFileDialogFilePicker)
.Filters.Clear
.Filters.Add "Photos", "*.jpg; *.gif; *.bmp, 1"
.InitialFileName = PhotosPath
.Title = "Select a photo to use"
.AllowMultiSelect = False
.Show
End With
The problem is the the file dialog comes up with the default "All Files *.*", totally ignoring my Filters.Add specification. Can anyone tell me what stupid mistake I am making here?
Thanks in advance
Dave G
I have been scratching my head over this simple problem for too long. Here's my VBA code (in Excel 2002):
With Application.FileDialog(msoFileDialogFilePicker)
.Filters.Clear
.Filters.Add "Photos", "*.jpg; *.gif; *.bmp, 1"
.InitialFileName = PhotosPath
.Title = "Select a photo to use"
.AllowMultiSelect = False
.Show
End With
The problem is the the file dialog comes up with the default "All Files *.*", totally ignoring my Filters.Add specification. Can anyone tell me what stupid mistake I am making here?
Thanks in advance
Dave G