File Dialog - Filters.Add does not work in Excel for Office 365

Mike2

New Member
Joined
Jan 5, 2019
Messages
42
Hello,

Has anyone encounter a Run Time Error 438 - Object doesn't support this property or method
when running VB code for File Dialog - Filters.Add in Excel for Office 365?

Typical codes:
Code:
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
With fd
   .ButtonName = "Select"
   .Filters.Add "All Files", "*.*"
   .InitialView = msoFileDialogViewDetails 
   .Show
End with

When i exclude Filters.Add "All Files", "*.*" in my code,
the File Dialog window does not show any file to select.

The code works fine without error in Excel 2010.

Your expertise to resolute this issue is greatly appreciated...thanks.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
your dialog is set to select Folders, while you need files. change to this:
Code:
set fd=Application.FileDialog ([COLOR=#ff0000]msoFileDialogFilePicker[/COLOR])
 
Upvote 0
Oh geeze, i have chosen the wrong selection in the pop up menu...no wonder the code did not work.
Thank you so much for catching the error, @bobsan42.
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,732
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top