It displays a folder chooser using API.
This API call can't be found with the API Viewer.
Inputs
Title, hWnd
Assumes
Paste this into a module.
Returns
The folder path
API DeclarationsOption Explicit
Declare Function SHBrowseForFolder Lib "shell32.dll" Alias "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long
Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias "SHGetPathFromIDListA" (ByVal pidl As Long, ByVal pszPath As String) As Long
'These constants are to be set to the ulFlags property in the BROWSEINFO type depending of what result you want
Const BIF_RETURNONLYFSDIRS = &H1 'Allows you to browse for system folders only.
Const BIF_DONTGOBELOWDOMAIN = &H2 'Using this value forces the _
user to stay within the domain level of the _
Network Neighborhhood
Const BIF_STATUSTEXT = &H4 'Displays a statusbar on the selection dialog
Const BIF_RETURNFSANCESTORS = &H8 'Returns file system ancestor only
Const BIF_BROWSEFORCOMPUTER = &H1000 'Allows you to browse for a computer
Const BIF_BROWSEFORPRINTER = &H2000 'Allows you to browse the Printers folder
Type BROWSEINFO
hOwner As Long
pidlRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End Type