Adding "Browse" Box to VBA Form

  • Thread starter Thread starter Rushey Platt
  • Start date Start date
R

Rushey Platt

Hi

For my own amusement I've been writing a VBA form that combines
'delete attachments' and 'move attachments' function on one form.

I've got a text box which defaults to a variable set in the code, e.g
"C:\My Documents".

Is there a way of added a "Browse" box to my form, so users can als
choose to navigate through the folders to the one they want (i.e. th
same functionality you get in File/Save As)?

Cheers

Rushe
 
You can add a component reference to the Toolbox for the Windows Common
Dialog control if you have that available. That lets you display the usual
Browse dialog. Just call the control when a Browse button is clicked.
There's documentation on how to use the Common Dialog in the MSDN library.
 
Rushey said:
For my own amusement I've been writing a VBA form that combines a
'delete attachments' and 'move attachments' function on one form.

I've got a text box which defaults to a variable set in the code, e.g.
"C:\My Documents".

Is there a way of added a "Browse" box to my form, so users can also
choose to navigate through the folders to the one they want (i.e. the
same functionality you get in File/Save As)?

You might want to check:

BrowseForFolder Method (Shell) (Windows Explorer and Controls):
http://msdn.microsoft.com/library/e.../objects/shell/browseforfolder.asp?frame=true

--
Cheers,

Siegfried Weber

If you want a smart answer, ask a smart question
http://catb.org/~esr/faqs/smart-questions.html

Why tables are bad: http://www.hotdesign.com/seybold/,
http://webdesign.about.com/cs/tables/a/aa020800b.htm

Note: Please do not send any e-mail to my old address
(e-mail address removed) because I am no longer connected with this
organization.
 
Back
Top