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.
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.