Browse for folder – new folder button
You are normally using SHBrowseForFolder API function to let user browse for folder, sample code you can find at MVPs.org or Lebans.com. In order to show "Make new folder" button on this dialog you need to set following flag:
.ulFlags = .ulFlags Or &H40
And MSDN BROWSEINFO Structure page lists other flags you can set for that dialog.
3 Comments:
You could also use the Shell.BrowseForFolder method, no API required. Ex:
Dim ShellApp As Object
Set ShellApp = CreateObject("Shell.Application"). _
BrowseForFolder(0, "Please choose a folder", 0)
You can still use the BROWSEINFO ulFlags structure.
Thanks for comment, JP!
here more info on that method:
Shell.BrowseForFolder Method
For even more flexibility, customization and functions, check out the FolderView control. It removes many of the limitations associated with using the "Browse for folder" dialog.
See http://www.ssware.com/fldrview.htm
Post a Comment
<< Home