PC Review


Reply
Thread Tools Rate Thread

On Click Event in Excel

 
 
ISUTri
Guest
Posts: n/a
 
      12th Dec 2006
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 With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      12th Dec 2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot seem to Cancel EXCEL App Right Click Event using C# =?Utf-8?B?TmljayBCaWdncw==?= Microsoft Excel Programming 18 28th Oct 2009 08:16 AM
When user press F5 after a button click event, the click event fires again! Max2006 Microsoft ASP .NET 2 19th Sep 2007 06:37 AM
Wire up a click event within another click event doesn't work... Chu Microsoft ASP .NET 2 10th Apr 2006 11:43 PM
click event problem in excel 2003 only =?Utf-8?B?cmZlcnJvbg==?= Microsoft Excel Programming 0 21st Apr 2005 05:43 PM
Double-click event question, part 2 (Excel 97) Bob Wall Microsoft Excel Programming 1 11th Sep 2004 03:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:15 PM.