Code to open windows explorer window

J

John

I was wondering anyone has code that in Access, have code
in order to open up an explorer window to a certain
folder?

Thanks,
John
 
D

Dan

John

Try this bit of code. It could be placed in the On Click
event of a button.

Dim OpenExp As Variant
OpenExp = Shell("Explorer.exe /n,/e,C:\Access\",
vbMaximizedFocus)

The /n and /e switches cause Explorer to be opened in a
new window using the standard Explorer view. The string
after the /e switch (C:\Access\) is where you define the
drive and folder you wish to navigate to. Good Luck!
 
D

Dale Fye

John,

Depends on what you are trying to do. If you want to use the browse
folders or the Windows File Open/Save dialog you can use the API calls
discussed at:

Call Windows Browse for Folder Dialog box
(http://www.mvps.org/access/api/api0002.htm)

or

Call Windows File Open/Save Dialog box
(http://www.mvps.org/access/api/api0001.htm)

The Access Web is a great source for code and FAQs. Strongly
recommend you add it to your web favorites.

--
HTH

Dale Fye


I was wondering anyone has code that in Access, have code
in order to open up an explorer window to a certain
folder?

Thanks,
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top