How do I limit navigation options with VBA filedialog

I am trying to limit the navigation abilities of FileDialog(msoFileDialogFolderPicker).  I am setting the initialfilename to the folder I wish to start from.   I want to allow navigation to any subfolder within the initial file name, but prevent from navigating higher.   Below is a snipit of my code,  How can I restrict my navigation capabilities?  

Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
fd.InitialFileName = "C:\WINDOWS\system32"
fd.Show
DavidWoods57017Asked:
Who is Participating?
 
Meir RivkinConnect With a Mentor Full stack Software EngineerCommented:
there's no built in mechanism in common dialog controls to restrict specific folder.
With the common dialog, you can browse any folder on any drive to which your login account has access and/or permissions.
what you can do is customize your own file dialog control which implements folder restrictions.



0
 
DavidWoods57017Author Commented:
sedqwick stated: what you can do is customize your own file dialog control which implements folder restrictions.  Can someone provide an example of customizing a a file dialog control?
0
 
Meir RivkinConnect With a Mentor Full stack Software EngineerCommented:
check this post for custom dialogs tutorial:
http://pubs.logicalexpressions.com/pub0009/LPMArticle.asp?ID=15
0
 
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:
...Now making a custom "File Dialog" box will be even trickier...

You will somehow set a "Top" folder.

But the key lies in sedqwick's  first post:
"With the common dialog, you can browse any folder on any drive to which your login account has access and/or permissions."
So if you could restrict the users Login Access to all but your Top level folder, you may have a shot here...

What would the worse case be if a user browsed above a certain folder?

JeffCoachman
   
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.