-
File Browser Return Full Internet Path
I'm using Excel 2010 and based upon the online examples, have written a function called within a sub to launch a browser.
The browser is used to find a folder path and store that into a string. However, this folder path seems to be similar to when I right click a file and select "Copy Path -> Copy Long Folder". What I want is something similar to if I were to right click and select "Copy Path -> Copy Internet Path". This way if I were to save this path to a file and use another computer to open this saved folder I don't have to worry if the two computers have the path mapped to the same drive or not.
Any advice would be greatly appreciated! Here is what I have:
In the sub:
str_nPath = FN_GetFolderName
Here's the function:
[VBA]Function FN_GetFolderName(Optional OpenAt As String) As String
Dim lng_Count As Long
FN_GetFolderName = vbNullString
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = OpenAt
.Show
For lng_Count = 1 To .SelectedItems.Count
FN_GetFolderName = .SelectedItems(lng_Count)
Next lng_Count
End With
End Function[/VBA]
-
If you mean networked drives, then UNC is the answer. http://support.microsoft.com/kb/160529
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules