What is this error about dialog box ?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

File Dialog object 3
Two File Dialogs 2
Import through dialogbox 4
SaveAs worksheets 1
Module Import error: Compile err 1
File Dialog Box Problem 3
File Dialog Picker 1
Choose File To SaveAs 6

Top