Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Filter The msoFileDialogOpen

Ive tried to filter this msoFileDialogOpen to only allow excel files to be
selected but cant get it to work. Any help ?
Set FD = Application.FileDialog(msoFileDialogOpen)
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = False
.InitialFileName = "C:\"
.Title = "(Open excel file)"

If .Show = True Then
.Execute
Else
Exit Sub

End If
End With
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Filter The msoFileDialogOpen

Hi Mike,

Try this.

Dim FD
Set FD = Application.FileDialog(msoFileDialogOpen)
With Application.FileDialog(msoFileDialogOpen)
.Filters.Clear
.Filters.Add "Excel files", "*.*"

'or
'.Filters.Add "All files", "*.xls"

.AllowMultiSelect = False
.InitialFileName = "C:\"
.Title = "(Open excel file)"

If .Show = True Then
.Execute
Else
Exit Sub

End If
End With

--
Regards,

OssieMac


"Mike" wrote:

Ive tried to filter this msoFileDialogOpen to only allow excel files to be
selected but cant get it to work. Any help ?
Set FD = Application.FileDialog(msoFileDialogOpen)
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = False
.InitialFileName = "C:\"
.Title = "(Open excel file)"

If .Show = True Then
.Execute
Else
Exit Sub

End If
End With

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Filter The msoFileDialogOpen

for the life of me I forgot the add

Thanks Ossie

"OssieMac" wrote:

Hi Mike,

Try this.

Dim FD
Set FD = Application.FileDialog(msoFileDialogOpen)
With Application.FileDialog(msoFileDialogOpen)
.Filters.Clear
.Filters.Add "Excel files", "*.*"

'or
'.Filters.Add "All files", "*.xls"

.AllowMultiSelect = False
.InitialFileName = "C:\"
.Title = "(Open excel file)"

If .Show = True Then
.Execute
Else
Exit Sub

End If
End With

--
Regards,

OssieMac


"Mike" wrote:

Ive tried to filter this msoFileDialogOpen to only allow excel files to be
selected but cant get it to work. Any help ?
Set FD = Application.FileDialog(msoFileDialogOpen)
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = False
.InitialFileName = "C:\"
.Title = "(Open excel file)"

If .Show = True Then
.Execute
Else
Exit Sub

End If
End With

Reply
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
Filter PivotTable dropdown items to match report filter Catherine D Excel Discussion (Misc queries) 1 August 16th 08 12:12 AM
Application.FileDialog(msoFileDialogOpen) and error 75 H.A. de Wilde[_12_] Excel Programming 3 June 24th 06 01:57 AM
Application.FileDialog(msoFileDialogOpen) H.A. de Wilde[_11_] Excel Programming 1 June 4th 06 09:56 PM
FileDialog(msoFileDialogOpen) Mitch Excel Programming 5 April 14th 06 08:16 PM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM


All times are GMT +1. The time now is 06:08 PM.

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

About Us

"It's about Microsoft Excel"