Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File/Folder Dialog not getting selected folder 1

Status
Not open for further replies.

Phil5673

Programmer
Sep 30, 2002
42
US
I have the following code used to select a "save to" location.

Set fDlg = Application.FileDialog(msoFileDialogFolderPicker)
With fDlg
.AllowMultiSelect = False
.Title = "Select folder to save export to."
.Filters.Clear
If .Show = False Then
For Each varFile In .SelectedItems
strFolderName = varFile
Next
End If
End With

When I step thru this code and select a folder, it doesn't show a value in varFile or strFolderName.

If anyone has any insight into why this is happening, I would be thankful.

Phil Edwards
 
Replace this:
If .Show = False Then
with this:
If .Show = -1 Then

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top