View Single Post
  #11   Report Post  
Bill Elerding
 
Posts: n/a
Default

Hi, Jim. Yes I put it on the first sheet (Table of Contents), with the
hyperlinks that go to the second worksheet (Data). This is what the code now
says of the first sheet (Table of Contents):


Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Application.Goto ActiveCell, True
End Sub


Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

End Sub


Is there anything I need to do to the two drop-down boxes at the top of the
code box?

The hyperlinks are working both as I originally wrote them, and also when I
use the insert hyperlink to a second page called 'Data'. It does seem that
the active cell is at either the top or bottom of the screen, but not to the
upper left. I'm clearly missing something obvious, as I can not use this
code if I also try it in a different worksheet. Yet, I know it works for
both you Dave.

Thanks...


"Jim Rech" wrote:

You did put the code in the module of the sheet with the hyperlinks, not the
sheet you want to go to, right? That's the only reason I can see that the
code wouldn't work.

--
Jim
"Bill Elerding" wrote in message
...
Whoops, Jim. The way it shows on the 'Sheet 1 code' is:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Application.Goto ActiveCell, True
End Sub


I had tried the option presented by Mr. Cone, also, with the same result.
I
guess it is a little late at night (midnight), and I'm doing something
wrong
if both approaches do not work for me. Thanks again, all!

"Jim Rech" wrote:

Right click on the tab of the worksheet with the hyperlinks and pick View
Code. In the module that appears paste this code:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Application.Goto ActiveCell, True
End Sub

--
Jim
"Bill Elerding" wrote in message
...
I have set up hyperlinks in a table of contents that jumps to specific
categories (individual cells) on the next worksheet. I'd like to have
a
macro execute automatically after the link to have that cell be
situated
at
the upper left of the screen. I'm just beginning to get into macro's,
and
have not been able to figure this one out, even after checking other
posts
on
this site. Thanks in advance!
--
William Elerding