Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default make Hyperlink jump on the top row

All,

I have quite a few hyperlinks in a workbook. Some of them are in cells and
some in objects. When I click on the hyperlinked cell or object i want that
cell to become the top row.

I was able to solve the problem for hyperlinks in the cell by using the
following code

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
ActiveWindow.ScrollRow = ActiveCell.Row
End Sub

Problem is that this does not work for hyperlinks in the objects. is there
a way to make the hyperlinked cell become the top row when hyperlink is
residing in an object such as a square or a rectangle.

Thanks much in advance.

RK
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 143
Default make Hyperlink jump on the top row

since follow hyperlink event not fire when shape clicked and since if you
have hyprlink in a shape the macro assigned to that shape not run i think
you shoud get rid of link and instead just assign macro to shape. this a
expl

Sub ObjFollowHyperlink()
Select Case Application.Caller
Case "Rectangle 1"
Application.Goto Range("J1"), True
Case "Rectangle 2"
Application.Goto Range("P15"), True
End Select
End Sub

"rk0909" wrote in message
...
| All,
|
| I have quite a few hyperlinks in a workbook. Some of them are in cells
and
| some in objects. When I click on the hyperlinked cell or object i want
that
| cell to become the top row.
|
| I was able to solve the problem for hyperlinks in the cell by using the
| following code
|
| Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
| ActiveWindow.ScrollRow = ActiveCell.Row
| End Sub
|
| Problem is that this does not work for hyperlinks in the objects. is
there
| a way to make the hyperlinked cell become the top row when hyperlink is
| residing in an object such as a square or a rectangle.
|
| Thanks much in advance.
|
| RK

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default make Hyperlink jump on the top row

thanks. this works great.

"Homey" wrote:

since follow hyperlink event not fire when shape clicked and since if you
have hyprlink in a shape the macro assigned to that shape not run i think
you shoud get rid of link and instead just assign macro to shape. this a
expl

Sub ObjFollowHyperlink()
Select Case Application.Caller
Case "Rectangle 1"
Application.Goto Range("J1"), True
Case "Rectangle 2"
Application.Goto Range("P15"), True
End Select
End Sub

"rk0909" wrote in message
...
| All,
|
| I have quite a few hyperlinks in a workbook. Some of them are in cells
and
| some in objects. When I click on the hyperlinked cell or object i want
that
| cell to become the top row.
|
| I was able to solve the problem for hyperlinks in the cell by using the
| following code
|
| Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
| ActiveWindow.ScrollRow = ActiveCell.Row
| End Sub
|
| Problem is that this does not work for hyperlinks in the objects. is
there
| a way to make the hyperlinked cell become the top row when hyperlink is
| residing in an object such as a square or a rectangle.
|
| Thanks much in advance.
|
| RK

.

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
HYPERLINK - Jump to another sheet in the same workbook Tor Einar Excel Worksheet Functions 4 April 4th 23 11:24 AM
how to make excel automaticly jump to next cell? If Bee Excel Worksheet Functions 0 January 9th 07 08:12 PM
How do I display hyperlink as embedded jump text vice friendly tex Brook Excel Discussion (Misc queries) 2 March 31st 06 05:09 AM
jump to hyperlink, extract value at specific destination in file Philip Excel Worksheet Functions 1 June 7th 05 10:37 AM
Excel should let hyperlink of PDF jump to a specific page like IE. Kenn Tan Excel Discussion (Misc queries) 2 April 18th 05 09:23 AM


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