Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2006

Tip: Looking for answers? Try searching our database.

On Click Event in Excel

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ISUTri - 12 Dec 2006 21:38 GMT
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
Bob Phillips - 12 Dec 2006 21:51 GMT
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.

Signature

---
HTH

Bob

(change the xxxx to gmail if mailing direct)

> 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
[quoted text clipped - 4 lines]
>
> Thanks for any help
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.