J
Jon
I am trying to create a script that utilizes the BrowseForFolder dialog
box. I want to have it return the full path of the selected folder
rather than just the folder name. Here is what I have so far:
Sub shellb()
Dim objShell
Dim objFolder
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.browseforfolder(0, "Choose folder
to be listed:", 0, 17)
If (Not objFolder Is Nothing) Then
Range("A3").Value = objFolder
End If
Set objFolder = Nothing
Set objShell = Nothing
End Sub
All this does is write the folder name to cell A3. Is there a way I
can get this script to record the full path to the folder I selected? I
have read some about the 'GetPathFromIDList' feature but I am not
familiar with it, any suggestions?
box. I want to have it return the full path of the selected folder
rather than just the folder name. Here is what I have so far:
Sub shellb()
Dim objShell
Dim objFolder
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.browseforfolder(0, "Choose folder
to be listed:", 0, 17)
If (Not objFolder Is Nothing) Then
Range("A3").Value = objFolder
End If
Set objFolder = Nothing
Set objShell = Nothing
End Sub
All this does is write the folder name to cell A3. Is there a way I
can get this script to record the full path to the folder I selected? I
have read some about the 'GetPathFromIDList' feature but I am not
familiar with it, any suggestions?