Hyperlink to open folder location (and select / highlight file)

n0c0re

New Member
Joined
Jun 21, 2012
Messages
8
Hi,

I am using Excel 2007 on Windows 7 64-bit.

When you search for a file in Windows 7, you can right click and select "Open folder location". This will launch a new window of Explorer and open the folder that the selected file or folder is located in, AND select / highlight the selected file or folder.

Is there a way to do this in Excel?.

I'd like to make a macro to generate these types of links. See pic for example.

2cpc6t3.png


Thanks in advance.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
You really don't need a macro.

Code:
=HYPERLINK(D5 &  "\" & C5,"CLICK HERE")

Look at the help file. You can even jump to a specific cell location.
 
Upvote 0
Sorry if I wasn't clear enough in my post.

I want to click the hyperlink such that Windows Explorer is launched, opened to the folder in column D, and highlight (but not open) the file specified in column C.

Now that I think about it some more, perhaps I need to launch Explorer.exe with some parameters?

Regards.
 
Upvote 0
Okay I'm pretty it can't be done with a hyperlink as you can't pass switches/parameters with a hyperlink.
I would need a macro and I can't afford to generate a different macro for every single line.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,432
Members
448,961
Latest member
nzskater

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