Navigating to a directory

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use this code to allow my user to select a specific file.

Dim dlg As Variant
Dim stPath As String

' Browse to the file to attach.
' This requires the Office 11 resource file.
Set dlg = Application.FileDialog(msoFileDialogFilePicker)

With dlg
.InitialFileName = CodeProject.Path
If .Show = -1 Then stPath = .SelectedItems(1)
End With

Me.txtSave.Value = stPath

How does one modify this to allow the user to select a directory rather
than a file?
TIA to all!
 
Back
Top