Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default HOW: Click Formula Hyperlink To Trigger Macro

I have a column (Column 6) where every row contains an IF() formula
that results in a HYPERLINK() formula if the previous cells in that
row each contain data. In other words, a hyperlink shows up if the
row is filled out. If the hyperlink shows up, and the user clicks it,
I want a macro to be triggered. I want to trigger a macro that draws
upon the data from the other cells in that row.

My first discovery was the Worksheet_FollowHyperlink event. It seemed
perfect. It triggers when a Hyperlink Object is click and captures
that location of the cell where the hyperlink was clicked. However,
it doesn't trigger with Hyperlink Formulas, just Objects.

I've been filling my hyperlink formula destinations with '#' so that
they don't go anywhere, but can I specify a hyperlink destination that
is a trigger for the macro?

Any help would be appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default HOW: Click Formula Hyperlink To Trigger Macro

Personally, I think I would drop the hyperlink idea.

I'd replace it with either a worksheet event (_beforerightclick or
_beforedoubleclick) or even an object (like a button from the forms toolbar) in
the cell.

Or even a single button at the top of the worksheet (freeze row 1) and then use
the activecell's row to do the work in the macro.

Henninger5 wrote:

I have a column (Column 6) where every row contains an IF() formula
that results in a HYPERLINK() formula if the previous cells in that
row each contain data. In other words, a hyperlink shows up if the
row is filled out. If the hyperlink shows up, and the user clicks it,
I want a macro to be triggered. I want to trigger a macro that draws
upon the data from the other cells in that row.

My first discovery was the Worksheet_FollowHyperlink event. It seemed
perfect. It triggers when a Hyperlink Object is click and captures
that location of the cell where the hyperlink was clicked. However,
it doesn't trigger with Hyperlink Formulas, just Objects.

I've been filling my hyperlink formula destinations with '#' so that
they don't go anywhere, but can I specify a hyperlink destination that
is a trigger for the macro?

Any help would be appreciated.


--

Dave Peterson
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
Macro add Hyperlink formula cmarch Excel Programming 26 January 13th 09 11:16 PM
How do you trigger an "On Click" event programatically Rob Wills Excel Programming 5 June 25th 08 04:52 AM
How to trigger code in Excel add-in after double-click or right-cl Ferko Excel Programming 2 April 19th 06 08:16 AM
How do I add hyperlink to Right click Kyle Excel Worksheet Functions 1 December 29th 04 05:58 PM
Trigger Code with Mouse Click Phil Hageman[_3_] Excel Programming 1 February 2nd 04 04:39 PM


All times are GMT +1. The time now is 09:25 AM.

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

About Us

"It's about Microsoft Excel"