Solved

excel extensions

Posted on 2014-04-10
3
205 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
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
Kimputer earned 500 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now