I am using the function below to open a folder selection window and what i want to do is make it select a specific directory as the root directory any help would be appreciated.

this is the code
VB Code:
  1. Option Explicit
  2.  
  3. Private Const BIF_RETURNONLYFSDIRS = 1
  4. Private Const BIF_DONTGOBELOWDOMAIN = 2
  5. Private Const MAX_PATH = 260
  6.  
  7. Private Type BrowseInfo
  8.     hwndOwner      As Long
  9.     pIDLRoot       As Long
  10.     pszDisplayName As Long
  11.     lpszTitle      As Long
  12.     ulFlags        As Long
  13.     lpfnCallback   As Long
  14.     lParam         As Long
  15.     iImage         As Long
  16. End Type
  17.  
  18. Private Declare Function SHBrowseForFolder Lib "shell32" (lpbi As BrowseInfo) As Long
  19.  
  20. Private Declare Function SHGetPathFromIDList Lib "shell32" (ByVal pidList As Long, ByVal lpBuffer As String) As Long
  21.  
  22. Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
  23.  
  24. Public Function OpenDirectoryTV(Optional odtvTitle As String) As String
  25.     Dim lpIDList As Long
  26.     Dim sBuffer As String
  27.     Dim szTitle As String
  28.     Dim tBrowseInfo As BrowseInfo
  29.     szTitle = odtvTitle
  30.     With tBrowseInfo
  31.            .hwndOwner = frmUploader.hWnd
  32.            .lpszTitle = lstrcat(szTitle, "")
  33.            .ulFlags = BIF_RETURNONLYFSDIRS
  34.         End With
  35.     lpIDList = SHBrowseForFolder(tBrowseInfo)
  36.     If (lpIDList) Then
  37.         sBuffer = Space(MAX_PATH)
  38.         SHGetPathFromIDList lpIDList, sBuffer
  39.         sBuffer = Left(sBuffer, InStr(sBuffer, vbNullChar) - 1)
  40.         OpenDirectoryTV = sBuffer
  41.     End If
  42. End Function

thanks in advance