Open Windows Explorer from a Userform

Bagsy Baker

New Member
Joined
Feb 17, 2002
Messages
41
I have created a userform with Command Buttons to open various spreadsheets that we use very often. What I would like to do is add some additional buttons that would open Windows Explorer in a specific folder. Even better if it would default to the "Search" option. Can this be done?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
I know I have a vbscript outside of excel to open the search option within a specific folder, and I believe you can pass it arguments like filename or extension:

Rich (BB code):
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("D:\")
Set objFolderItem = objFolder.ParseName("Your directory without trailing backslash here")
objFolderItem.InvokeVerb("find")
I don't know if it needs to be adapted for use in Excel.

-edit
You could always have excel call the script through the use of run or the shell command if it can't be adapted.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,150
Messages
6,123,312
Members
449,094
Latest member
Chestertim

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top