View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Hyperlink macro for personal.xls

Here is a slight revision

Sub Hyperlinkcell()
'
Dim actual As Range
Dim Act_Cell as Range
set Act_Cell = ActiveCell
Set actual = Application.InputBox( _
Prompt:="Select cell to hyperlink.", Type:=8)
ActiveSheet.Hyperlinks.Add _
Anchor:=Act_Cell, _
Address:="", _
SubAddress:="'" & actual.Parent.Name & _
"'!" & actual.Address(0, 0), _
TextToDisplay:=actual.Parent.Name & _
"!" & actual.Address(0, 0)
End Sub

--
Regards,
Tom Ogilvy


"Tom Ogilvy" wrote in message
...
Sub Hyperlinkcell()
'
Dim actual As Range

Set actual = Application.InputBox( _
Prompt:="Select cell to hyperlink.", Type:=8)
ActiveSheet.Hyperlinks.Add _
Anchor:=Selection, _
Address:="", _
SubAddress:="'" & actual.Parent.Name & _
"'!" & actual.Address(0, 0), _
TextToDisplay:=actual.Text
End Sub


--
Regards,
Tom Ogilvy


"al007" wrote in message
ups.com...
Sub Hyperlinkcell()
'
Dim actual As Range

Set actual = Application.InputBox(Prompt:="Select cell to
hyperlink.", Type:=8)
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
SubAddress:=actual, TextToDisplay:=ActiveCell.Value
End Sub

Can anybody fix the above hyperlink macro pls.

Thxs