sarahjackel
asked on
Common Dialog filter for only folders
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
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
You will have to use browseforfolder code following
Use the Browse for Folders API:
Implementing the Browse For Folders Dialog
http://vbnet.mvps.org/code/browse/browsefolders.htm
Implementing the Browse For Folders Dialog
http://vbnet.mvps.org/code/browse/browsefolders.htm
ASKER
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
.hWndOwner = Me.hWnd
any other suggestions?
sarah
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can just put 0 (zero) in for owner:
.hOwner = 0
.hOwner = 0
Erick beat me to it!!
ASKER
Terrific! Thank you all for your very fast answers!
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.
=)
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.
=)