K
Kevin E.
I used the Application.GetOpenFilename and it worked beautifully, thanks for
your help and suggestions. Seeing as how I am pretty new to programming I am
going to have to play around with the code to see how and where I can use it
more often.
your help and suggestions. Seeing as how I am pretty new to programming I am
going to have to play around with the code to see how and where I can use it
more often.
Tom Ogilvy said:Let's look at the score Kevin
1 person in "some other forums" talked about the common dialog and I assume
was talking either about VB6 or knew less about Excel than you.
4 people in a specific excel forum have suggested
Application.GetOpenFilename()
Just to add to the non-API choices, if you are using and will only use
Office XP or Office 2003, then you also have a file dialog
----------------------------------
Returns a FileDialog object representing an instance of the file dialog.
expression.FileDialog(fileDialogType)
expression Required. An expression that returns one of the objects in the
Applies To list.
fileDialogType Required MsoFileDialogType. The type of file dialog.
MsoFileDialogType can be one of these MsoFileDialogType constants.
msoFileDialogFilePicker Allows user to select a file.
msoFileDialogFolderPicker Allows user to select a folder.
msoFileDialogOpen Allows user to open a file.
msoFileDialogSaveAs Allows user to save a file.
Example
In this example, Microsoft Excel opens the file dialog allowing the user to
select one or more files. Once these files are selected, Excel displays the
path for each file in a separate message.
Sub UseFileDialogOpen()
Dim lngCount As Long
' Open the file dialog
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = True
.Show
' Display paths of each file selected
For lngCount = 1 To .SelectedItems.Count
MsgBox .SelectedItems(lngCount)
Next lngCount
End With
End Sub
--
Regards,
Tom Ogilvy
NickHK said:Kevin,
Check out Application.GetOpenfilename in the VBA Help. That's the easiest
way.
"OP"=Original Poster, the person that started this thread. i.e. You
NickHK