Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlinks to folder

Status
Not open for further replies.

hoyyqs012

Programmer
Oct 26, 2009
2
FR
Hi.

I have an excel 2007 sheet called "SERIAL.xlsx" located on C:\Docs, with two columns. One column contains (for each row) a serial number, and the other shall contain a link to folder whose name begins with this number, but also a title.

Example:

A B
1 000123 (Link to "C:\Docs\Stuff\000123 Foo")
2 000124 (Link to "C:\Docs\Stuff\000124 Bar")

I need a macro that makes this link. Example: It gets the 000123 number from column A, looks in the C:\Docs\Stuff folder for a folder that _begins_ with 000123, and then inserts a hyperlink in column B to this folder "C:\Docs\Stuff\000123 Foo". There will only be one folder in C:\Docs\Stuff for each number.

A bonus feature would be if the first part (C:\Docs) of the folder path in the hyperlink could be omitted, so that only the path from the folder where the document "SERIAL.xlsx" is located, is used (Stuff\000123 Foo). This would allow moving the document and folder system to different drives.

Any ideas? All help is very much appreciated! Thanks in advance.
 
What have you tried so far and where in your code are you stuck ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top