hyperlink to top left 'between' worksheets

D

dgold82

So I have been searching the forum and only found the following code to bring
a hyperlinked cell to the top left of the window:

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

Is there anyway to do this BETWEEN worksheets (above code works only for
hyperlinks within same worksheet). No matter how I've tried to manipulate
this code clicking on a link from another worksheet does not bring the linked
cell to the top left of the window. Any help would be appreciated! Thanks.
 
D

dgold82

Think I found the problem actually. I neglected to mention that the
hyperlinks are not in cells--they are clipart. So if I put in the below code
in the worksheet with the clipart, the linked cells on the other worksheet do
not go to the top of the page.

Any workaround?
 
T

Tim Williams

Clicking on a hyperlink attrached to a picture doesn't seem to trigger the
"followHyperlink" event.
If you want to use pictures instead of links in cells then you could use
macros instead of a hyperlink.

You could either create a single sub for each picture, or use one sub to
handle all of the calls (maybe switching destination based on the name of
the graphic: see Application.Caller)

Tim
 
D

dgold82

Thanks, Tim. I recorded a macro that works fine and just added:
ActiveWindow.ScrollRow = ActiveCell.Row
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top