Hyperlink going to two rows above Hyperlink cell reference.

S.H.A.D.O.

Well-known Member
Joined
Sep 6, 2005
Messages
1,915
Good morning,

I have a sheet called "Summary" and a sheet called "Calculation".

I have set up Hyperlinks in the sheet called "Summary" which relate to different cells in the sheet called "Calculation". This works very well.

What I would like to be able to do is when ANY of the Hyperlinks are pressed that the sheet "Calculation" goes two rows above the reference set in the Hyperlink and the two rows above the reference moves the sheet upto the top of the page. Something like...

Code:
ActiveWindow.ScrollRow = 1

...if VBA was used.

Thanks in advance.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Would a Worksheet Change Event to move the sheet up be the way to go, and if so, how would I do this please?
 
Upvote 0
I think I have worked it out.

Code:
Private Sub Worksheet_Activate()
    ActiveWindow.ScrollRow = ActiveCell.Row - 1
End Sub

Do I need to disable and enable Events at all within the code?

If there are any other suggestions I would be grateful.
 
Upvote 0

Forum statistics

Threads
1,214,798
Messages
6,121,630
Members
449,041
Latest member
Postman24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top