What is this error about dialog box ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I copy the piece of code from ACESS help to my VBA editor and execute it :

Sub Main()

Dim fdfs As FileDialogFilters
Dim fdf As FileDialogFilter
Set fdfs = Application.FileDialog(msoFileDialogSaveAs).Filters
For Each fdf In fdfs
If InStr(1, fdf.Extensions, "xls", vbTextCompare) > 0 Then
MsgBox "Description of filter: " & fdf.Description
End If
Next fdf

End Sub

The program stops at the line :

Set fdfs = Application.FileDialog(msoFileDialogSaveAs).Filters

with a run time error 445, "object do not support this action"

WHAT'S WRONG ?

thanks
 
Back
Top