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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlinks in Excel

Status
Not open for further replies.
Joined
Jun 30, 2003
Messages
196
Location
GB
I have a excel spread sheet where the user is required to type in a code that represents one of our products.

I want it so depending on what product code they type in, a hyperlink is offred which when cliked opens up a drawing of that product.

All the drawings have a unique naming convention which is the product code.

So what i am asking is is there a way i can get excel to read from a cell and construct a hyperlink from that product code.
 
How about using a lookup (vlookup or hlookup) to another sheet that contains the product and it's appropriate hyperlink. This way, any new products can be added to the bottom of the list without having to change the lookup.

[pc]

Graham
 
Could just put this in the worksheet change event:

Dim prod As String
if target.address <> &quot;$A$1&quot; then exit sub
prod = Range(&quot;A1&quot;).Text

ActiveSheet.Hyperlinks.Add Anchor:=Range(&quot;A2&quot;), Address:= _
&quot;C:\Home\&quot; & prod & &quot;.jpg&quot;, TextToDisplay:= _
&quot;View Product: &quot; & prod

assumes a prod code entered in A1 to generate a hyperlink in A2
You will need to adjust the path to your own network path and may have to jiggle about with your naming conventions to extract the correct file name from the prod code entered

Rgds, Geoff
Quantum materiae materietur marmota monax si marmota monax materiam possit materiari?
Want the best answers to your questions ? faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top