Help: I want a "browse for folder" dialog, but with a few extras...

A

AC

Hi

I need code to open some sort of browse for folder dialog. Currently
I use what most people seem to recommend:

Private Declare Function SHBrowseForFolder Lib "shell32.dll" Alias _
"SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) _
As Long


I would like 2 "extras" however.

1. I would like to be able to set the initial directory the browse
folder dialog opens to. This needs to still allow the user to
navigate up to higher folders in the tree than the initial dir [I saw
a suggestion on the net but it did not allow to navigate above the
initial dir]

2. I would like the user to be able to Add a new folder if they want
to while navigating the dialog. You often see this on saveAs dialogs
as a button showing a folder icon with a small star in the top corner.


A v.good example of this dialog turns up if you open an Outlook email
with multiple attachments, and click File-->SaveAttachments --> and
then select all the attachments.


Is there something out there which I can use?

Thanks
AndyC
 
A

AC

Stephan's example has the ability to set the starting folder...

http://www.lebans.com/callbackbrowser.htm

Thanks, I found that one. Unfortunately it misses out on wish list
item (2)

As a note for anyone else who uses the above link, he suppiles a
sample Access app which contains a form to demo it in action. Behind
this form is the code which invokes the dialog, and it makes a VERY
IMPORTANT NOTE that the code has to in the form itself rather than in
a standalone module or you get random GPFs.

Cheers
AndyC
 
D

Douglas J. Steele

Check what Randy Birch has at
http://vbnet.mvps.org/index.html?code/browse/browseadv.htm

Obligatory warning: Randy's site is aimed at VB programmers. Because there
are some significant differences between the controls available for forms in
VB and in Access, his samples often won't port directly into Access. In this
particular case, all of his references to the .Text property of text boxes
have to be removed (or changed to .Value). The .Text property is only
available in Access when the text box has focus.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Stephan's example has the ability to set the starting folder...

http://www.lebans.com/callbackbrowser.htm

Thanks, I found that one. Unfortunately it misses out on wish list
item (2)

As a note for anyone else who uses the above link, he suppiles a
sample Access app which contains a form to demo it in action. Behind
this form is the code which invokes the dialog, and it makes a VERY
IMPORTANT NOTE that the code has to in the form itself rather than in
a standalone module or you get random GPFs.

Cheers
AndyC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top