View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
DataHog DataHog is offline
external usenet poster
 
Posts: 9
Default hyperlink on part of a text contained in a cell

Try this routine:

Sub AddCellHyperlink()
' Select cell on the worksheet to place the hyperlink
'
cellcontents = InputBox("Enter Cell Display", "Hyperlink Cell Display", _
Default:=ActiveCell.Value)
If cellcontents = "" Then Exit Sub
ActiveCell.Formula = cellcontents

webaddress = InputBox("Enter Web Address:" & Chr(13) & _
"Example: http://www.google.com", "Hyperlink Address", _
Default:="http://www.google.com/")
If webaddress = "" Then Exit Sub

With Worksheets(1)
.Hyperlinks.Add ActiveCell, webaddress
End With
End Sub

J Knowles

"Cajeto 63" wrote:

Hello,

I would like to know how I can apply a hyperlink to only a part of a text
that is contain into a cell.

Example: cell contains "If you doubt it just Google it!"
where there would be a link to the "Google" website on the word Google only.

Thank you.
--


Regards, Cajeto 63.