Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
run sub from hyperlink
Is there a way to run a sub routine from a hyperlink in an excell cell?
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
run sub from hyperlink
Have you considered the Worksheet_FollowHyperlink event?
-- HTH, Barb Reinhardt If this post was helpful to you, please click YES below. " wrote: Is there a way to run a sub routine from a hyperlink in an excell cell? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
run sub from hyperlink
Include the following event macro in the worksheet code area:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) MsgBox ("Hello world") End Sub -- Gary''s Student - gsnu2007k " wrote: Is there a way to run a sub routine from a hyperlink in an excell cell? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
run sub from hyperlink
On Dec 18, 1:49*pm, Gary''s Student
wrote: Include the following event macro in the worksheet code area: Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) MsgBox ("Hello world") End Sub -- Gary''s Student - gsnu2007k " wrote: Is there a way to run a sub routine from a hyperlink in an excell cell?- Hide quoted text - - Show quoted text - That is helpful but how can I have more than one per sheet each triggering an different sub routine? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
run sub from hyperlink
On Dec 18, 1:49*pm, Gary''s Student
wrote: Include the following event macro in the worksheet code area: Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) MsgBox ("Hello world") End Sub -- Gary''s Student - gsnu2007k " wrote: Is there a way to run a sub routine from a hyperlink in an excell cell?- Hide quoted text - - Show quoted text - that is helpful but how can I have more than one per page each triggering an different sub? Or how can I tell which which hyperlink triggered it so I can do a select case or something. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
run sub from hyperlink
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
MsgBox (Target.Parent.Address & Chr(10) & ActiveCell.Address) End Sub Try this. You will see that you have: 1. the cell that was clicked on 2. the destination address -- Gary''s Student - gsnu200821 "mg" wrote: On Dec 18, 1:49 pm, Gary''s Student wrote: Include the following event macro in the worksheet code area: Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) MsgBox ("Hello world") End Sub -- Gary''s Student - gsnu2007k " wrote: Is there a way to run a sub routine from a hyperlink in an excell cell?- Hide quoted text - - Show quoted text - that is helpful but how can I have more than one per page each triggering an different sub? Or how can I tell which which hyperlink triggered it so I can do a select case or something. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
run sub from hyperlink
In fact, you can put the name of the desired macro in the ScreenTip and run
it as follows: Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) Dim s As String s = Target.ScreenTip Application.Run s End Sub -- Gary''s Student - gsnu200821 "mg" wrote: On Dec 18, 1:49 pm, Gary''s Student wrote: Include the following event macro in the worksheet code area: Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) MsgBox ("Hello world") End Sub -- Gary''s Student - gsnu2007k " wrote: Is there a way to run a sub routine from a hyperlink in an excell cell?- Hide quoted text - - Show quoted text - that is helpful but how can I have more than one per page each triggering an different sub? Or how can I tell which which hyperlink triggered it so I can do a select case or something. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't make hyperlink function work for hyperlink to website | Excel Worksheet Functions | |||
Moving rows with Hyperlink doesn't move hyperlink address | Excel Discussion (Misc queries) | |||
Intra-workbook hyperlink: macro/function to return to hyperlink ce | Excel Discussion (Misc queries) | |||
Macro to Copy Hyperlink to another file as a HYPERLINK, not text... | Excel Programming | |||
reading html when hyperlink address not hyperlink text diplayed | Excel Programming |