Hi friends,
I am a creating a tool in Excel using VBA. In that once the user click on "Load" button, the tool should allow the user to select the folder which contains the input files. By default the path of selection will be starting from Desktop.
Now if i specify the (starting) path from which the usr has to select a file, it is not allowing the usr to go to the levels above the starting path. Is there a way to avoid this ?
My snippet is :
Dim Openat as variant
Openat = "E:\ExcelViewer"
Set shellObj = CreateObject("Shell.Application")
Set fldr = shellObj.BrowseForFolder(0, "Select folder containing input files", Openat)
If fldr Is Nothing Then
Exit Sub
End If
Here i am not not able to select any folders above this startin path "E:\ExcelViewer". In some cases this can happen.
Suggest a solution?
I am a creating a tool in Excel using VBA. In that once the user click on "Load" button, the tool should allow the user to select the folder which contains the input files. By default the path of selection will be starting from Desktop.
Now if i specify the (starting) path from which the usr has to select a file, it is not allowing the usr to go to the levels above the starting path. Is there a way to avoid this ?
My snippet is :
Dim Openat as variant
Openat = "E:\ExcelViewer"
Set shellObj = CreateObject("Shell.Application")
Set fldr = shellObj.BrowseForFolder(0, "Select folder containing input files", Openat)
If fldr Is Nothing Then
Exit Sub
End If
Here i am not not able to select any folders above this startin path "E:\ExcelViewer". In some cases this can happen.
Suggest a solution?