?
Solved

excel extensions

Posted on 2014-04-10
3
Medium Priority
?
229 Views
Last Modified: 2014-04-10
File pen dialogue box:
------------------------
Sub Get_Data()
FileToOpen = Application.GetOpenFilename _
(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
0
Comment
Question by:doctorbill
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 36

Accepted Solution

by:
Kimputer earned 2000 total points
ID: 39991608
For ease of use, I grouped all Excel files together:

FileFilter:="Excel Files, *.xls;*.xlsx;*.xlsm,All files,*.*, XML files,*.xml")

Open in new window


And NOT grouped:

FileFilter:="Excel Files,*.xls,Excel new,*.xlsx,Excel Macro,*.xlsm,All files ,*.*,XML files,*.xml")

Open in new window

0
 

Author Comment

by:doctorbill
ID: 39991617
Perfect - thanks
0
 

Author Closing Comment

by:doctorbill
ID: 39991621
solved
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question