relative pathnames

binghamw

BingleyW
Local time
Today, 10:41
Joined
Apr 22, 2004
Messages
57
Hi,
I have set up a browse folder button so that the folder you select shows up in the textbox.
However, right now it displays the pathname as this:

M:\Shared\foldername

When I want it to show up as this:

\\Zeus\SharedData\GIS\Shared\foldername

This is the module code for the browse folder button:

Public Function BrowseFolder(szDialogTitle As String) As String
Dim X As Long, bi As BROWSEINFO, dwIList As Long
Dim szPath As String, wPos As Integer

With bi
.hOwner = hWndAccessApp
.lpszTitle = szDialogTitle
.ulFlags = BIF_RETURNONLYFSDIRS
End With

dwIList = SHBrowseForFolder(bi)
szPath = Space$(512)
X = SHGetPathFromIDList(ByVal dwIList, ByVal szPath)

If X Then
wPos = InStr(szPath, Chr(0))
BrowseFolder = Left$(szPath, wPos - 1)
Else
BrowseFolder = vbNullString
End If
End Function



Is there something in here I need to change?
Does anyone have any suggestions?

Thanks.
 
as far as I know, if you have a mapped drive to that location, then it will use that mapping as the path by default.
 
thanks... that works.
 

Users who are viewing this thread

Back
Top Bottom