Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot seem to Cancel EXCEL App Right Click Event using C# Nick Biggs Excel Programming 18 October 28th 09 08:16 AM
userform label double-click goes to click event John Paul Fullerton Excel Programming 3 May 19th 06 05:54 PM
click event problem in excel 2003 only rferron Excel Programming 0 April 21st 05 05:43 PM
Can VSTO handle a Picture click event in Excel? Yuhong Excel Programming 0 December 3rd 04 05:37 PM
Double-click event question, part 2 (Excel 97) Bob Wall Excel Programming 1 September 11th 04 03:50 AM


All times are GMT +1. The time now is 07:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"