thunderhawk6630
New Member
- Joined
- Jun 26, 2019
- Messages
- 5
I have an estimating spreadsheet that we use to estimate jobs. There are 80 sheets, all identical.
The sheets can be quite long, and to prevent scrolling, I froze the top row, and added some hyperlinks (using the formula =hyperlink). The links I have are Top, Materials, Labor, Summary Subcontract. Clicking on them jumps the screen down to that section.
The links work, but what I want to have happen is when I click the link, the cell that is highlighted, is brought up to the top left of the screen, currently it is at the bottom.
Through all my testing, it seems that the followhyperlink command does not actually follow the formula method of inserting hyperlinks. I could go through the entire workbook and hard link everything to the correct spot. But that would take some time, and make it hard to make changes in the future. However I do have working code to make the hyperlinked cell appear in the top left if I hard code the link. See code below. I simply put this in the Woorkbook, rather than the Module and it works great.
So my question is, is there a way to get excel to treat the formula method of links, the same as the inserted way? Is there some clever workaround? If works if I use SelectionChange, but then anything I click jumps to the top.
Thanks,
The sheets can be quite long, and to prevent scrolling, I froze the top row, and added some hyperlinks (using the formula =hyperlink). The links I have are Top, Materials, Labor, Summary Subcontract. Clicking on them jumps the screen down to that section.
The links work, but what I want to have happen is when I click the link, the cell that is highlighted, is brought up to the top left of the screen, currently it is at the bottom.
Through all my testing, it seems that the followhyperlink command does not actually follow the formula method of inserting hyperlinks. I could go through the entire workbook and hard link everything to the correct spot. But that would take some time, and make it hard to make changes in the future. However I do have working code to make the hyperlinked cell appear in the top left if I hard code the link. See code below. I simply put this in the Woorkbook, rather than the Module and it works great.
Code:
'This code makes hyperlinks appear at the top of the page, not the bottom
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)
ActiveWindow.ScrollRow = ActiveCell.Row
End Sub
So my question is, is there a way to get excel to treat the formula method of links, the same as the inserted way? Is there some clever workaround? If works if I use SelectionChange, but then anything I click jumps to the top.
Thanks,
Last edited by a moderator: