Created
January 17, 2021 10:43
-
-
Save timotewb/7026533afe1fbbfb1ab5f41c1e47f1f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Function fileNamePath() As String | |
'--- fileNamePath() | |
' in: n/a | |
' out: string, path and name of selected file | |
' desc: opens an explorer window so the user can select a file. No file type filters are applied. | |
Dim fd As Office.FileDialog | |
Set fd = Application.FileDialog(msoFileDialogFilePicker) | |
With fd | |
.Filters.Clear | |
.Title = "Select file" | |
.AllowMultiSelect = False | |
If .Show = True Then | |
fileNamePath = .SelectedItems(1) | |
End If | |
End With | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment