Make VBA open a browser window
On Thu, 22 Jun 2006 20:54:06 +0200, Frans Verhaar wrote:
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?
With Application.FileDialog(msoFileDialogFilePicker)
.AllowMultiSelect = False
.Filters.Add "csv files", "*.csv"
.Show
If .SelectedItems.Count 0 Then MsgBox .SelectedItems.Item(1)
End With
--
PL
|