AccessBlog.net

News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
Alex
Name:Alex Dybenko

Location:Moscow, Russia

Tuesday, December 21, 2010

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


SNAGHTMLc5f856



And MSDN BROWSEINFO Structure page lists other flags you can set for that dialog.

Labels: ,

3 Comments:

Blogger JP said...

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.

4:50 PM  
Blogger Alex Dybenko said...

Thanks for comment, JP!
here more info on that method:
Shell.BrowseForFolder Method

4:57 PM  
Blogger LogicNP said...

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

9:48 AM  

Post a Comment

<< Home