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

Hyperlink only part of an Excel cell?

Status
Not open for further replies.

VBAguy22

IS-IT--Management
Aug 5, 2003
180
CA
Hello
I was told to document (what a drag)
So I chose Excel (i know, i know, not the best tool)
I have a cell which has my function name with paramaters passed to it say:

myFunct (var1,var2,var3)

Now I have .pdf files desribing var1, var2, var3 -- each file describes one variable so I have: C:\var1.pdf;C:\var2.pdf;C:\var3.pdf
How do I create a hyperlink so that every time the user selects a different var it opens the coresponding pdf file?
I managed to do it for the entire cell, but we are talking parsing the cell into 3 pieces

thanks
 
A B C D
Function Param1 Param2 Param3
Name

Is the only way I can think of doing it, I think a hyperlink is a one to one with a cell

HTH
--Paul
 
Hi VBAguy22,

I don't think you can do it. Although it is possible to have more than one hyperlink in a cell (using code) you cannot have separate elements of the text individually linked to different ones.

You can either do what Paul suggests or, if you have a lot of time on your hands, you could try manipulating some shapes to look like what you want.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 

VBAguy22,
In case the following would suit your purposes, it's a fairly quick process:

1. copy and paste all the cells at once into Word

FOR THE FIRST HYPERLINK...
2. click anywhere within the var
3. CTRL+K (create hyperlink)
4. click the File button to browse to the corresponding pdf
5. select the file then click OK once or twice (depends upon how you selected the file)
If your path is the same and the filenames similar for each of your pdfs, you can open the hyperlink dialog box(right-click, Hyperlink, Edit Hyperlink) and copy to clipboard the path and filename.

FOR ALL REMAINING HYPERLINKS...
6. click anywhere within the var
7. CTRL+K (create hyperlink)
8. CTRL-V in the "Type the file or Web page name:" window and edit the link as necessary
9. hit Enter
 
I forgot to add at the bottom of instructions previously posted...

After creating all your hyperlinks, you can delete the underlines by pressing CTRL+A, CTRL+U, CTRL+U.


FYI: I wish it were possible to create different color hyperlinks when documenting with Word, but I haven't figured out a way for this to be accomplished. For example, all var1's would be RED, var2's BLUE, var3's GREEN, etc. and they would stay their assigned color after being clicked ("followed").
 
Hi dcompto,

I don't follow how doing it in Word helps get it into Excel, but to get different coloured hyperlinks in Word, all you need to do is set up multiple styles.

When you add a hyperlink, it is given the Style [blue]Hyperlink[/blue], and when it has been followed it retains the same style but inherits the characteristics of the [blue]FollowedHyperlink[/blue] style. I don't know how these two styles are linked.

If you create a new Style called, say, [blue]HyperGreen[/blue] or [blue]HyperRed[/blue], and then apply this style to a hyperlink, then when it has been followed it does not change its appearance. Personally I would like to be able to somehow link to another style (something like FollowedHyperGreen) but cannot find out how to do it. What you want, however, can be done without that complication.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
Thanks, Tony, for the "Style" info. As to, your comment, "I don't follow how doing it in Word helps get it into Excel." It doesn't. Your original post stated,

> I was told to document (what a drag)
> So I chose Excel (i know, i know, not the best tool)

With "chose" being the operative word, I presented my suggestion to use Word, blah blah blah. I wish it had been helpful.
 
Hi dcompto,

Sorry, didn't mean to be critical. I guess I was just wondering whether there was some final trick to get it back into Excel, having done the business in Word.

You are right the questioner did say Excel (if not the task) was his choice, and it may have been helpful, I don't know. As he has not returned, pehaps he's found something he considers more interesting.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
[blush] Yikes, Tony, I see that I mistook you for the questioner. I apologize.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top