Code to open windows explorer window

  • Thread starter Thread starter John
  • Start date Start date
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
 
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!
 
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
 
Back
Top