Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running code by clicking on a hyperlink cell
Hi there, I have a list of published reports in a worksheet, some of which hav hyperlinks to their location in Clarity (browser based projec management system) and some of which have empty hyperlinks (with given title) I also have some code that generates and sends an email from lotu notes. what I need to do is create some code that will allow users to click o a hyperlink titled "CPO Reports" in column C (there are many instance of the same empty link) and then a message box will appear with yes/no button. If they click yes then the email code will run. any suggestions? I can create command buttons on each line that will activate the cod when they are clicked, but I want to do this with the existin hypelinks instead. thank in advance, Mat -- matp ----------------------------------------------------------------------- matpj's Profile: http://www.excelforum.com/member.php...fo&userid=2107 View this thread: http://www.excelforum.com/showthread.php?threadid=52752 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running code by clicking on a hyperlink cell
Hello
Place this code below into the Worksheet module (right-click worksheet tab and select view code and then paste) NB: Please Amend accordingly: Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) If Target.TextToDisplay = "CPO Reports" Then Select Case MsgBox("run the mail macro", vbQuestion + vbYesNo, "Confirm") Case vbYes: SendMail 'name of your macro to run Case Else: Exit Sub End Select End If End Sub HTH Cordially Pascal |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running code by clicking on a hyperlink cell
wow! thanks for that. I made a mistake in my first post. The CPO Reports are not actually hyperlinks. I'm writing this on behalf of a colleague, but he made them appear like hyperlinks, by underlining and colouring blue!! Is there a way I can use your code for just activating the cell? or can I create hyperlinks with no address or a null adress? thanks so much, Matt -- matpj ------------------------------------------------------------------------ matpj's Profile: http://www.excelforum.com/member.php...o&userid=21076 View this thread: http://www.excelforum.com/showthread...hreadid=527528 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running code by clicking on a hyperlink cell
Matt
Yes you may consider creating hyperlinks to make my sample code work! To do so you may only refer to each cell address for instance. HTH Cordially Pascal |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Suppress hyperlink Dialogue box when clicking on Link | Excel Discussion (Misc queries) | |||
hyperlink - clicking on hyper link to select cell in another sheet | Excel Worksheet Functions | |||
Clicking hyperlink causes toolbar to show | Excel Discussion (Misc queries) | |||
Eliminate second browse box when right clicking for hyperlink | Excel Worksheet Functions | |||
Code for making a cell chage color by dbl clicking, with either a | Excel Programming |