Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hyperlink events

Two related issues.

Firstly is it possible to "trap" the followhyperlink event
at a sheet or workbook level when the hyperlink is derived
from a textbox (or any other shape for that matter).

Secondly is it possible to set up a workbook level
followhyperlink event for all textboxes on workbook. I
tried using a technique that works for controls on a
userform but I'm doing something wrong or (as the error
message suggests) shapes don't expose the appropriate
functionality. It doesn't necessarly need to be the
followhyperlink event, the click event would be good
enough.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Hyperlink events

Maybe you could fudge something.

I added a bunch of textboxes from the drawing toolbar (not the controltoolbox
toolbar) and typed in my hyperlink addresses. But then I removed the hyperlink
itself--I just wanted the text.

Then I assigned each textbox this macro:

Option Explicit
Sub myTextBoxClick()

Dim myTB As TextBox
Set myTB = ActiveSheet.TextBoxes(Application.Caller)

ThisWorkbook.FollowHyperlink myTB.Text

End Sub

This is pretty restrictive, but it might give you some ideas.



Ignatius wrote:

Two related issues.

Firstly is it possible to "trap" the followhyperlink event
at a sheet or workbook level when the hyperlink is derived
from a textbox (or any other shape for that matter).

Secondly is it possible to set up a workbook level
followhyperlink event for all textboxes on workbook. I
tried using a technique that works for controls on a
userform but I'm doing something wrong or (as the error
message suggests) shapes don't expose the appropriate
functionality. It doesn't necessarly need to be the
followhyperlink event, the click event would be good
enough.


--

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
how do I organize events yuki Excel Discussion (Misc queries) 3 January 8th 07 01:58 PM
Enabling Events Robin Clay Excel Discussion (Misc queries) 8 July 12th 06 03:07 PM
Events won't Disable! roadkill Excel Discussion (Misc queries) 2 April 26th 06 04:36 PM
frequency of events cruxto Excel Discussion (Misc queries) 0 October 20th 05 02:56 AM
events? [email protected] Excel Discussion (Misc queries) 1 September 14th 05 03:26 PM


All times are GMT +1. The time now is 07:29 PM.

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"