Button to open Windows Explorer window

pikou

Registered User.
Local time
Yesterday, 16:36
Joined
Jul 20, 2004
Messages
24
Hello everybody, it's been a while since i wrote on the forums and yet again I am in the need to ask for the help of this wonderful community.
I have a form on which is a button that I want when pressed to open a Windows Explorer window displaying the contents of a directory.
The exact way that I want this thing to work is like this : The user is browsing a form of lets say client details and on the form lies the button that when pressed will take the client's name and apply it to the path in order to open that Windows Explorer window and create a path like C:\program files\client name\ and display the contents of that window.
I would like if possible someone who can point me as to how I can construct this button to work cause I cant see to get it done.
Many thanks for your time :)
 
pikou said:
The exact way that I want this thing to work is like this : The user is browsing a form of lets say client details and on the form lies the button that when pressed will take the client's name and apply it to the path in order to open that Windows Explorer window and create a path like C:\program files\client name\ and display the contents of that window.

Which part is throwing you off?

It's easy to open an explorer window by creating an InternetExplorer object. (Make sure that you have Internet Controls selected in your references first). You can then show the object and set the URL to any string.

If you need help with any of the steps I described, just say so and I (or others) can provide sample code. Otherwise, a bit of reading up and trial and error should get you where you want to be.

Good luck

SHADOW
 
Try ...

shell("explorer.exe """ & myPath & """",vbNormalFocus )
 

Users who are viewing this thread

Back
Top Bottom