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 / Programming / June 2006

Tip: Looking for answers? Try searching our database.

Make VBA open a browser window

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frans Verhaar - 22 Jun 2006 19:54 GMT
Hi,

I have this code in VBA that calls a query table from a certain csv file.
However, the name of this csv file is not constant.
Therefore I would rather like VBA to open a browser screen that shows all
csv files in a specific folder, where the user can just double click the
file that is needed as a source for the query table.

How can I let VBA open a browser window and show me all available CSV files?

Thanks,
Frans
Piotr Lipski - 22 Jun 2006 20:18 GMT
> Hi,
>
[quoted text clipped - 5 lines]
>
> How can I let VBA open a browser window and show me all available CSV files?

   With Application.FileDialog(msoFileDialogFilePicker)
       .AllowMultiSelect = False
       .Filters.Add "csv files", "*.csv"
       .Show
       If .SelectedItems.Count > 0 Then MsgBox .SelectedItems.Item(1)
   End With

Signature

PL

Frans Verhaar - 23 Jun 2006 06:57 GMT
Thanks, that works.

>> Hi,
>>
[quoted text clipped - 13 lines]
>        If .SelectedItems.Count > 0 Then MsgBox .SelectedItems.Item(1)
>    End With
Frans Verhaar - 24 Jun 2006 11:46 GMT
Thanks a lot Piotr. It works fine!
Regards,
Frans

>> Hi,
>>
[quoted text clipped - 13 lines]
>        If .SelectedItems.Count > 0 Then MsgBox .SelectedItems.Item(1)
>    End With
 
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.