Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default 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
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
Suppress hyperlink Dialogue box when clicking on Link Brent E Excel Discussion (Misc queries) 1 October 16th 08 08:58 PM
hyperlink - clicking on hyper link to select cell in another sheet Aaron Hodson \(Coversure\) Excel Worksheet Functions 3 January 3rd 08 02:58 PM
Clicking hyperlink causes toolbar to show TerryTutor Excel Discussion (Misc queries) 12 October 4th 07 03:33 PM
Eliminate second browse box when right clicking for hyperlink Dirter Scott Excel Worksheet Functions 0 November 1st 06 03:38 AM
Code for making a cell chage color by dbl clicking, with either a Zan Dorris Excel Programming 1 February 13th 06 04:00 PM


All times are GMT +1. The time now is 09:49 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"