?
Solved

Common Dialog filter for only folders

Posted on 2005-03-18
9
Medium Priority
?
534 Views
Last Modified: 2007-12-19
Hello,
I am using the common dialog to allow the user to navigate to the folder where their data is stored.  I only want to allow them to see and select folders.  How do I write this in the filter command due to folders not having an extension?
 ex. commonDialog.Filter = "*.exe|*.exe"

thanks in advance!
Sarah
0
Comment
Question by:sarahjackel
[X]
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
  • 2
  • 2
  • +1
9 Comments
 
LVL 12

Expert Comment

by:gbzhhu
ID: 13575805
You will have to use browseforfolder code following
0
 
LVL 32

Expert Comment

by:Erick37
ID: 13575811
Use the Browse for Folders API:

Implementing the Browse For Folders Dialog
http://vbnet.mvps.org/code/browse/browsefolders.htm
0
 
LVL 12

Expert Comment

by:gbzhhu
ID: 13575844
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:sarahjackel
ID: 13575941
sorry...I forgot to add that I am writing this in VBA.  I tried the code in the links, but I get an eror on the line:
.hWndOwner = Me.hWnd

any other suggestions?

sarah
0
 
LVL 32

Accepted Solution

by:
Erick37 earned 2000 total points
ID: 13575988
You can use the desktop window handle:

Private Declare Function GetDesktopWindow Lib "user32" () As Long

'======================

.hWndOwner = GetDesktopWindow
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 13575999
You can just put 0 (zero) in for owner:

    .hOwner = 0
0
 
LVL 12

Expert Comment

by:gbzhhu
ID: 13576013
Erick beat me to it!!
0
 

Author Comment

by:sarahjackel
ID: 13576032
Terrific!  Thank you all for your very fast answers!
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 13576039
By the way sarahjackel,

I don't want any points for this question as it has been more than adequately answered by Erick37 and gbzhhu.

I just happened to see your comment and answered at the same time as Erick37.

=)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month9 days, 1 hour left to enroll

764 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