Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filter only shortcuts and xl files
Try
Dim WB As Workbook Dim FName As String With Application.FileDialog(msoFileDialogOpen) .Filters.Clear .Filters.Add "Excel Files", "*.xls", 1 .FilterIndex = 1 .InitialFileName = "%UserProfile%\My Documents" .AllowMultiSelect = False If Not .Show Then Exit Sub FName = .SelectedItems(1) End With -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) "Steven" wrote in message ... I have the following code: Private Sub OpenMyDocuments() On Error GoTo ErrMacro Dim FName As String With Application.FileDialog(msoFileDialogOpen) .InitialFileName = "%UserProfile%\My Documents" .AllowMultiSelect = False If Not .Show Then Exit Sub FName = .SelectedItems(1) End With If Len(FName) 0 Then Set wb = Workbooks.Open(FName) End If Application.RecentFiles.Add Name:=FName Windows("Notes.xls").Close (0) ErrMacro: End Sub It shows - All Files (*.*) - in the Files of Type field. How do I make it default to - All Microsoft Office Excel Files - ? Thank you for your help. Steven |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel files on USB -- taskbar shortcuts don't work | Excel Discussion (Misc queries) | |||
How to remove listed shortcuts for deleted Excel files? | Excel Discussion (Misc queries) | |||
all my shortcuts to excel files open up as a picture | Excel Discussion (Misc queries) | |||
How to disable the shortcuts of excel files created by MSExcel 20. | Excel Discussion (Misc queries) | |||
shortcuts to excel files. | Excel Programming |