Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Click Event in Excel
Is there anyway I can have Excel run code on a single click in a cell?
What I'm trying to do is I have a spreadsheet that has hyperlinks in it. However, I want it to run code when someone clicks on the hyperlink before it sends the user on to the hyperlink. I've found where I can do this with a double click but that doesn't do me any good since the hyperlink only requires one click. Thanks for any help |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Click Event in Excel
Use the FollowHyperlink event
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) 'your code End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- --- HTH Bob (change the xxxx to gmail if mailing direct) "ISUTri" wrote in message ps.com... Is there anyway I can have Excel run code on a single click in a cell? What I'm trying to do is I have a spreadsheet that has hyperlinks in it. However, I want it to run code when someone clicks on the hyperlink before it sends the user on to the hyperlink. I've found where I can do this with a double click but that doesn't do me any good since the hyperlink only requires one click. Thanks for any help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cannot seem to Cancel EXCEL App Right Click Event using C# | Excel Programming | |||
userform label double-click goes to click event | Excel Programming | |||
click event problem in excel 2003 only | Excel Programming | |||
Can VSTO handle a Picture click event in Excel? | Excel Programming | |||
Double-click event question, part 2 (Excel 97) | Excel Programming |