Solved

Getting a PATH from a user

Posted on 1998-07-13
5
134 Views
Last Modified: 2010-05-03
I am using the CommonDialog control to get files from the user. This is really easy. But how do I get just a PATH from the user? I tried the CommonDialog and it works as long as there is a file in the directory for the user to select. But some times the directory being selected is totaly empty and there is no way to use the ShowOpen dialog without a file being selected.
0
Comment
Question by:schworak
  • 3
5 Comments
 
LVL 6

Expert Comment

by:clifABB
ID: 1465571
I'm afraid you may have to create your own dialog box.  This is the only solution I've ever been able to come up with.

I submit this as a comment.  If, as I believe, there is no alternative other than creating your own dialog box, let me know and I'll resubmit as an answer.
0
 
LVL 2

Accepted Solution

by:
rayb earned 100 total points
ID: 1465572
Check out this site:  http://www.mvps.org/ccrp/
They've got a cool FolderTreeview control.
0
 
LVL 3

Author Comment

by:schworak
ID: 1465573
I can't get the treeview control to even load up in VB. I have a help request in on the news group. What I have done in the mean time is just use the OpenSave method on the normal dialog control with junk as the file name. I don't need a file name so what ever is entered gets ignored for now. Not perfect, but it works.
0
 
LVL 3

Author Comment

by:schworak
ID: 1465574
Sorry for the delay in testing the TreeView answer. There have been problems getting it properly installed. I now have the suggested method for installing so I will be able to test it's function now.
0
 
LVL 3

Author Comment

by:schworak
ID: 1465575
WOO HOO! That works great! Thanks for pointing me to the right place!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question