Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2008

Tip: Looking for answers? Try searching our database.

Macro that opens files with differing extensions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vrzimmerm@hotmail.com - 15 Apr 2008 18:13 GMT
I've got a macro that currently prompts the user to open a .CSV file.
The command I use for this is:

FName = Application.GetOpenFilename("Excel Files (*.csv),*.csv")

This command only displays .CSV files in the "open" window that's
displayed to the user.   I'd like to alter this somewhat so that the
user can open more than just .csv files.  I'd like for it to list
the .txt and .xls files as well.   What would the adjusted
GetOpenFilename command look like for this?

Many thanks.
Dave Peterson - 15 Apr 2008 18:25 GMT
VBA's help is pretty good for this:

   Dim FName As Variant
   FName = Application.GetOpenFilename("Text Files, *.csv;*.txt")

> I've got a macro that currently prompts the user to open a .CSV file.
> The command I use for this is:
[quoted text clipped - 8 lines]
>
> Many thanks.

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.