Getting a PATH from a user

Posted on 1998-07-13
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.
Question by:schworak
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3

Expert Comment

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.

Accepted Solution

rayb earned 100 total points
ID: 1465572
Check out this site:
They've got a cool FolderTreeview control.

Author Comment

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.

Author Comment

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.

Author Comment

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

728 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