Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hyperlink macro for personal.xls
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hyperlink macro for personal.xls
Hi Al007,
Try: '============= Public Hyperlinkcell() Dim actual As Range Set actual = Application. _ InputBox(Prompt:="Select cell to hyperlink.", _ Type:=8) ' ActiveSheet.Hyperlinks.Add _ Anchor:=Selection, _ Address:="", _ SubAddress:=actual.Address(0, 0) End Sub '<<============= --- Regards, Norman "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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hyperlink macro for personal.xls
Thxs - but it does not work if a cell from a different sheet is
selected - can you help pls |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hyperlink macro for personal.xls
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hyperlink macro for personal.xls
Thxs tom,
Your code is working great & am using it for empty cells & using SubAddress:=activecell.value for non empty cells with an if statement cheers!!! Tom Ogilvy wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro runs in source , but not when in Personal Macro Workbook | Excel Programming | |||
Personal macro workbook and personal.xls | Excel Discussion (Misc queries) | |||
Intra-workbook hyperlink: macro/function to return to hyperlink ce | Excel Discussion (Misc queries) | |||
personal.htm & personal.xls in Macro | Excel Programming |