Solved

Getting a PATH from a user

Posted on 1998-07-13
5
132 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel object stays open 19 76
Macro: print each sheet to pdf using ExportAsFixedFormat 11 48
Saving history changes to sub form 4 44
clicking a shape in a frame array vb6 3 45
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

831 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