Let a user choose a folder?
I put this code in a Sub and I got an error message that
said something like "Exit not allowed in Sub". Should
I replace that "Exit Function" code with something else?
What is that code for anyways?
Thanks!
"GS" wrote in message
...
This will display the dialog to allow user to choose a folder. It returns
the full path.
With Application.FileDialog(4) 'msoFileDialogFolderPicker
If .Show = False Then Exit Function 'User cancelled
sPath = .SelectedItems(1)
End With
--
Garry
|