LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Application.FileDialog .Filters.Add method not working as expected

Hello

I have used the following in Excel 2007 to allow a user to select a
file:

Dim fdObj As FileDialog

Set fdObj = Application.FileDialog(msoFileDialogOpen)
With fdObj
.AllowMultiSelect = False
.Title = gsAPP_NAME
.Filters.Clear
.Filters.Add "Consolidation Reports", ".xls"
.InitialView = msoFileDialogViewDetails
If .Show = -1 Then
.Execute
End If
End With

Set fdObj = Nothing

Fairly standard I would have thought, but this breaks on the line with
the .Filters.Add method, with error message "Invalid procedure call or
argument". What am I missing here?

Cheers
Geoff
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FileDialog Filters.clear eggpap Excel Programming 1 May 2nd 08 09:57 AM
Using Application.FileDialog(msoFileDialogFolderPicker) Ayo Excel Discussion (Misc queries) 1 March 12th 08 01:01 PM
Application.FileDialog(msoFileDialogOpen) H.A. de Wilde[_11_] Excel Programming 1 June 4th 06 09:56 PM
Application.Volatile not working as expected Richards Excel Discussion (Misc queries) 3 February 3rd 05 12:20 AM
Alternative to Application.FileDialog (please)? Rob Bovey Excel Programming 0 September 9th 04 11:20 AM


All times are GMT +1. The time now is 08:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"