Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Hyperlink Type - SheetFollowHyperlink event

I get different results in XL2002.
Clicking a textbox with a hyperlink does not trigger a follow hyperlink event.

Also, the help file for the "Sheet Follow Hyperlink Event" says...
"Sh Required Object. The Worksheet object that contains the hyperlink."
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"kriti"
wrote in message
Hello,
I have code in the SheetFollowHyperlink event of the Workbook class, which
takes the target cell of the hyperlink to the top row in the visible window.

The problem I am having is this: I have two types of hyperlinks in my
workbook - text, and textbox. For some reason, the text hyperlinks (text
directly in a cell) is triggering the SheetFollowHyperlink event and
performing the necessary scroll, but the hyperlinked textboxes are not. I put
in code on each worksheet to check if the textboxes are even being recognized
as hyperlink objects, and they are. Their type, however, is different. I
outputted the type of each hyperlink by using the hyperlink.type
property...and the text hyperlinks are reported as "msoHyperlinkRange", while
the textboxes are reported as "msoHyperlinkShape". This, of course, makes
sense...but the SheetFollowHyperlink event is supposed to be triggered when
ANY hyperlink object is clicked.
This is the code (including a debugging line with a msgbox to tell me when
the event has been triggered).

Code:
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target
As Hyperlink)
MsgBox "entered SheetFollowHyperlink"
ActiveWindow.ScrollRow = ActiveCell.Row
With ActiveWindow
.DisplayHeadings = False
.DisplayGridlines = False
.DisplayWorkbookTabs = False
End With
End Sub

Any help will be very greatly appreciated. The issue is now time-sensitive!
Thank you,
Kriti
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
Capture the hyperlink event before it goes to the link Korekiyo Baisotei Excel Discussion (Misc queries) 0 September 25th 08 05:53 AM
Event Macro - Hyperlink selected SteveT Excel Discussion (Misc queries) 0 June 19th 08 09:21 PM
Need count of unique devices for each event type jengallo Excel Discussion (Misc queries) 2 August 14th 07 10:06 PM
Hyperlink Type - SheetFollowHyperlink event kriti Excel Discussion (Misc queries) 3 December 1st 06 05:20 PM
How to type e-mail addresses *without* getting hyperlink? Jumping Rabbit Excel Discussion (Misc queries) 1 January 13th 06 03:07 PM


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