Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to assign a macro to a word in a cell - like a hyperlink -
rather than to a control button? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There's the Worksheet_FollowHyperlink event that is fired when a hyperlink
is clicked. You can put code there. NickHK "Mack Neff" wrote in message ... Is it possible to assign a macro to a word in a cell - like a hyperlink - rather than to a control button? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK... this is a start, but I'm really a novice at coding... so far have just
recorded macros and followed a few step-by-step VBA projects. Can you be a bit more specific? "NickHK" wrote in message ... There's the Worksheet_FollowHyperlink event that is fired when a hyperlink is clicked. You can put code there. NickHK "Mack Neff" wrote in message ... Is it possible to assign a macro to a word in a cell - like a hyperlink - rather than to a control button? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
1 - Select the worksheet you have the hyperlink(s) on.
2 - Right-click the WS tab. select "View Code". 3 - Select "Worksheet" from the top left combo box. 4 - Select "FollowHyperlink" from the top right combo box. VBA will generate the event signature for you: Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) 'You put your own code here End Sub "Target" gives you info on the hyperlink clicked. There is also the related Workbook_SheetFollowHyperlink, which you can get to by a similar process as above, but first double click the "ThisWorkbook" module under your Project: Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink) End Sub With this event, you can react to a hyperlink (Target) on any WS (Sh) in that workbook. NickHK "Mack Neff" wrote in message ... OK... this is a start, but I'm really a novice at coding... so far have just recorded macros and followed a few step-by-step VBA projects. Can you be a bit more specific? "NickHK" wrote in message ... There's the Worksheet_FollowHyperlink event that is fired when a hyperlink is clicked. You can put code there. NickHK "Mack Neff" wrote in message ... Is it possible to assign a macro to a word in a cell - like a hyperlink - rather than to a control button? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I assign a numeric value to text? IE cell = yes then 1 | Excel Discussion (Misc queries) | |||
how do i assign a value to a cell containing text | Excel Worksheet Functions | |||
Assign values to text within a cell | Excel Worksheet Functions | |||
Possible to assign macro defined as private to a form control. | Excel Programming | |||
assign a macro to a control button | Excel Discussion (Misc queries) |