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

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Hyperlink Type - SheetFollowHyperlink event



"kriti" wrote:

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


You posted in the wrong area. Post this question in the VBA area.

B+
HALinNY
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Hyperlink Type - SheetFollowHyperlink event

Would that be the Excel Programming group?

"HALinNY" wrote:



"kriti" wrote:

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


You posted in the wrong area. Post this question in the VBA area.

B+
HALinNY

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Hyperlink Type - SheetFollowHyperlink event



"kriti" wrote:

Would that be the Excel Programming group?


Yes, I believe that is the one where you are most likely to get help.

B+
HALinNY
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
Excel will not let me type any characters....I can type in Word. deholly Excel Discussion (Misc queries) 1 March 17th 06 10:34 AM
How do I emulate rightclick on a hyperlink in an Excel Macro Emulate RightClick on Hyperlink in Macro Excel Discussion (Misc queries) 0 January 2nd 06 08:40 AM
Hyperlink problem to cell in same workbook stainless Excel Worksheet Functions 4 November 16th 05 08:10 AM
Hyperlink problem to cell in same workbook stainless Excel Discussion (Misc queries) 1 November 15th 05 04:53 PM
Using the Hyperlink Function and finding filenames Jeni Q Excel Worksheet Functions 0 September 20th 05 02:37 PM


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