Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HYPERLINK - Jump to another sheet in the same workbook | Excel Worksheet Functions | |||
how to make excel automaticly jump to next cell? | Excel Worksheet Functions | |||
How do I display hyperlink as embedded jump text vice friendly tex | Excel Discussion (Misc queries) | |||
jump to hyperlink, extract value at specific destination in file | Excel Worksheet Functions | |||
Excel should let hyperlink of PDF jump to a specific page like IE. | Excel Discussion (Misc queries) |