VBA Code:
Dim FilePicker As FileDialog
Set FSO = CreateObject("Scripting.FileSystemObject")
Dim fname As String
Set FilePicker = Application.FileDialog(msoFileDialogFilePicker)
With FilePicker
.Title = "Choose1"
.AllowMultiSelect = False
If .Show <> -1 Then GoTo NextCode
myFile = .SelectedItems(1)
fname = FSO.GetBaseName(myFile)
fnametest = FSO.GetFolder(myFile)
End With
fname works fine, but I dont get the other half does not:
fnametest = FSO.GetFolder(myFile)
"path not found"
myfile = ""C:\Users\Jones\Downloads\File 1.xlsx"