Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / March 2008

Tip: Looking for answers? Try searching our database.

Excel Hyper Links

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cblasingame - 12 Mar 2008 21:27 GMT
I have a column that has a list of paths and file names.  I need these to be
turned into hyperlinks to the file listed.  I cannot however use the
=Hyperlink formula, because when I do that the link does not come through
when i covert the spread sheet to a PDF, it only seems to work when I insert
the hyperlink.  Please tell me there is a way to do this.
Tom Hutchins - 12 Mar 2008 22:32 GMT
Paste this macro into a VBA module in your workbook. Select the cells to be
converted to hyperlinks - it's okay if the selected range includes blank
cells. Then run the AddHyperlinks macro (Tools >> Macro >> Macros >>
AddHyperlinks >> Run).

Public Sub AddHyperlinks()
Dim Rng As Range
For Each Rng In Selection
   If Len(Rng.Value) > 0 Then
       ActiveSheet.Hyperlinks.Add Anchor:=Rng, _
       Address:=Rng.Value, TextToDisplay:=Rng.Value
   End If
Next Rng
End Sub

If you are new to macros, david mcritchie has some instructions on his site
for navigating the vba editor and how to copy/paste macros into your project.
    http://www.mvps.org/dmcritchie/excel/excel.htm

Hope this helps,

Hutch

> I have a column that has a list of paths and file names.  I need these to be
> turned into hyperlinks to the file listed.  I cannot however use the
> =Hyperlink formula, because when I do that the link does not come through
> when i covert the spread sheet to a PDF, it only seems to work when I insert
> the hyperlink.  Please tell me there is a way to do this.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.