Hi,
I am using below code to select folder.
This code is working fine at my system.
However, when I try this code at user, am getting bug as 'path name' could not be found.
I copied the path manually and tried accessing the same. Was able to access.
Not able to understand why macro is throwing bug.
Can anyone please help me in this.
I am using below code to select folder.
This code is working fine at my system.
However, when I try this code at user, am getting bug as 'path name' could not be found.
I copied the path manually and tried accessing the same. Was able to access.
Not able to understand why macro is throwing bug.
Can anyone please help me in this.
VBA Code:
Public Function SelectFolder()
Dim My_V As Variant
With Application.FileDialog(msoFileDialogFolderPicker)
.Show
On Error Resume Next
Err.Clear
My_V = .SelectedItems(1)
If Err.Number <> 0 Then
My_V = vbNullString
End If
End With
SelectFolder = CStr(My_V)
My_Sht.Range("A1") = SelectFolder
End Function