(Solved) – Selecting the entire row of the hyperlinked target cell and scrolling left the target cell

  • by

After clicking a hyperlink and arriving at a target cell, I would like to select (highlight) the entire row of the target cell and scroll left if it’s too far right so that the target cell is around the middle column of the screen and about 5 columns to its right can be seen. I used FollowHyperlink() after looking through similar posts in stackoverflow. However, the code has no error but does not do anything.. How can I rewrite the code to address the issue?

Sub CreateHyperlink()
If i > 1 Then
    .Hyperlinks.Add ...
End If
End Sub    

Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)

ActiveWindow.ScrollColumn = Target.Column

End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *