L
linto
i am using the following code for getting user input for a folder name.
i got this code from a book.
it works well but
how do i get the complete path of the folder assigned to a string variable?
like "UserFile"
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = Application.DefaultFilePath & "\"
.Title = "Please select a location for saving the Work Request"
.Show
If .SelectedItems.Count = 0 Then
MsgBox "Location to save WR not selected"
Else
MsgBox .SelectedItems(1)
End If
UserFile = SelectedItems.Value 'is this right?
End With
i got this code from a book.
it works well but
how do i get the complete path of the folder assigned to a string variable?
like "UserFile"
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = Application.DefaultFilePath & "\"
.Title = "Please select a location for saving the Work Request"
.Show
If .SelectedItems.Count = 0 Then
MsgBox "Location to save WR not selected"
Else
MsgBox .SelectedItems(1)
End If
UserFile = SelectedItems.Value 'is this right?
End With