doctorbill
asked on
excel extensions
File pen dialogue box:
------------------------
Sub Get_Data()
FileToOpen = Application.GetOpenFilenam e _
(Title:="Please choose a file to import", _
FileFilter:="Excel Files *.xls (*.xls), *.* (*.*), *.xml (*.xml),")
''
If FileToOpen = False Then
MsgBox "No file specified.", vbExclamation, "Duh!!!"
Exit Sub
Else
Workbooks.Open Filename:=FileToOpen
End If
End Sub
-------------------------- --
The above code is working (except for the *.*) but I need to add the following extensions:
*.*, *.xlsx, *.xlsm
When I add them they do not appear in the open dialogue
All that appears at the moment are the xls and xlm
------------------------
Sub Get_Data()
FileToOpen = Application.GetOpenFilenam
(Title:="Please choose a file to import", _
FileFilter:="Excel Files *.xls (*.xls), *.* (*.*), *.xml (*.xml),")
''
If FileToOpen = False Then
MsgBox "No file specified.", vbExclamation, "Duh!!!"
Exit Sub
Else
Workbooks.Open Filename:=FileToOpen
End If
End Sub
--------------------------
The above code is working (except for the *.*) but I need to add the following extensions:
*.*, *.xlsx, *.xlsm
When I add them they do not appear in the open dialogue
All that appears at the moment are the xls and xlm
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
solved
ASKER