Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default scrolling target cell to top of page after hyperlink

i am now trying to get the target cells of my hyperlinks to appear at the top
of the page instead of at the bottom. i know you answered this one in bill
elerdings post "execute macro after hyperlink" but i cant get it to work,
maybe because i wrote my hyperlink formulas instead of inserting them into
the cells.
is there anything else you can think of
thank you for your continued assistance
brock
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default scrolling target cell to top of page after hyperlink

paste this small macro in the worksheet code area:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Application.Goto Reference:=ActiveCell.Address(ReferenceStyle:=xlR1 C1),
Scroll:=True
End Sub

be careful of the wrap
--
Gary''s Student - gsnu200746


"BROCK8292" wrote:

i am now trying to get the target cells of my hyperlinks to appear at the top
of the page instead of at the bottom. i know you answered this one in bill
elerdings post "execute macro after hyperlink" but i cant get it to work,
maybe because i wrote my hyperlink formulas instead of inserting them into
the cells.
is there anything else you can think of
thank you for your continued assistance
brock

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default scrolling target cell to top of page after hyperlink

thanks for the response garys student
i tried pasting it in the code of either spreadsheet but neither worked
do you have any other ideas
thank you
brock

"Gary''s Student" wrote:

paste this small macro in the worksheet code area:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Application.Goto Reference:=ActiveCell.Address(ReferenceStyle:=xlR1 C1),
Scroll:=True
End Sub

be careful of the wrap
--
Gary''s Student - gsnu200746


"BROCK8292" wrote:

i am now trying to get the target cells of my hyperlinks to appear at the top
of the page instead of at the bottom. i know you answered this one in bill
elerdings post "execute macro after hyperlink" but i cant get it to work,
maybe because i wrote my hyperlink formulas instead of inserting them into
the cells.
is there anything else you can think of
thank you for your continued assistance
brock

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default scrolling target cell to top of page after hyperlink

Let's make sure the routine is in the correct area. It needs to go in the
worksheet code area:


It is very easy to install and automatic to use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you have any concerns, first try it on a trial worksheet.

If you save the workbook, the macro will be saved with it.


To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm




--
Gary''s Student - gsnu200746


"BROCK8292" wrote:

thanks for the response garys student
i tried pasting it in the code of either spreadsheet but neither worked
do you have any other ideas
thank you
brock

"Gary''s Student" wrote:

paste this small macro in the worksheet code area:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Application.Goto Reference:=ActiveCell.Address(ReferenceStyle:=xlR1 C1),
Scroll:=True
End Sub

be careful of the wrap
--
Gary''s Student - gsnu200746


"BROCK8292" wrote:

i am now trying to get the target cells of my hyperlinks to appear at the top
of the page instead of at the bottom. i know you answered this one in bill
elerdings post "execute macro after hyperlink" but i cant get it to work,
maybe because i wrote my hyperlink formulas instead of inserting them into
the cells.
is there anything else you can think of
thank you for your continued assistance
brock

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default scrolling target cell to top of page after hyperlink

normally i just go to toolsmacrovba then select the worksheet and go from
there.
im familiar with basic macros but have difficulty with the language when
trying to write my own. i tried doing it like you said but still cant get it
to work
perhaps i am explaining it incorrectly
i have 1000 hyperlinks in one spreadsheet whose targets are 1000
corresponding rows in a sheet 2. i then used a row adder macro to seperate
these corresponding rows by 49 rows each. when i use the hyperlinks, the
target row appears at the bottom of the screen and id like for it to appear
at the top of the screen. does that make sense?
im pretty new to this and i know i dont express my ideas as well as many of
the other users do
thank you for your patience and continued assistance
brock

"Gary''s Student" wrote:

Let's make sure the routine is in the correct area. It needs to go in the
worksheet code area:


It is very easy to install and automatic to use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you have any concerns, first try it on a trial worksheet.

If you save the workbook, the macro will be saved with it.


To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm




--
Gary''s Student - gsnu200746


"BROCK8292" wrote:

thanks for the response garys student
i tried pasting it in the code of either spreadsheet but neither worked
do you have any other ideas
thank you
brock

"Gary''s Student" wrote:

paste this small macro in the worksheet code area:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Application.Goto Reference:=ActiveCell.Address(ReferenceStyle:=xlR1 C1),
Scroll:=True
End Sub

be careful of the wrap
--
Gary''s Student - gsnu200746


"BROCK8292" wrote:

i am now trying to get the target cells of my hyperlinks to appear at the top
of the page instead of at the bottom. i know you answered this one in bill
elerdings post "execute macro after hyperlink" but i cant get it to work,
maybe because i wrote my hyperlink formulas instead of inserting them into
the cells.
is there anything else you can think of
thank you for your continued assistance
brock



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default scrolling target cell to top of page after hyperlink

Our patience will be rewarded in the end.

I think we should start with the simplest possible example, get it to work
on that example, and then migrate to your final worksheet. That way we will
know that your version of Excel and its configuration are consistent with
this approach.

1. start with a fresh, brand new, worksheet.
2. select A1 in Sheet1 and pull-down:
a. Insert Hyperlink Place in this document B9
3. click the link to insure we get to B9
4. right-click the tab (sheet name) at the bottom and select View code
5. Paste this in:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Dim s As String
MsgBox ("re-scrolling")
s = ActiveCell.Address(ReferenceStyle:=xlR1C1)
Application.Goto Reference:=s, Scroll:=True
End Sub

6. Close the VBA window
7. Click the link and we should observe two things:
a. A message box will pop up €“ click o.k.
b. The jump and re-scroll should occur

--
Gary''s Student - gsnu200746


"BROCK8292" wrote:

normally i just go to toolsmacrovba then select the worksheet and go from
there.
im familiar with basic macros but have difficulty with the language when
trying to write my own. i tried doing it like you said but still cant get it
to work
perhaps i am explaining it incorrectly
i have 1000 hyperlinks in one spreadsheet whose targets are 1000
corresponding rows in a sheet 2. i then used a row adder macro to seperate
these corresponding rows by 49 rows each. when i use the hyperlinks, the
target row appears at the bottom of the screen and id like for it to appear
at the top of the screen. does that make sense?
im pretty new to this and i know i dont express my ideas as well as many of
the other users do
thank you for your patience and continued assistance
brock

"Gary''s Student" wrote:

Let's make sure the routine is in the correct area. It needs to go in the
worksheet code area:


It is very easy to install and automatic to use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you have any concerns, first try it on a trial worksheet.

If you save the workbook, the macro will be saved with it.


To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm




--
Gary''s Student - gsnu200746


"BROCK8292" wrote:

thanks for the response garys student
i tried pasting it in the code of either spreadsheet but neither worked
do you have any other ideas
thank you
brock

"Gary''s Student" wrote:

paste this small macro in the worksheet code area:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Application.Goto Reference:=ActiveCell.Address(ReferenceStyle:=xlR1 C1),
Scroll:=True
End Sub

be careful of the wrap
--
Gary''s Student - gsnu200746


"BROCK8292" wrote:

i am now trying to get the target cells of my hyperlinks to appear at the top
of the page instead of at the bottom. i know you answered this one in bill
elerdings post "execute macro after hyperlink" but i cant get it to work,
maybe because i wrote my hyperlink formulas instead of inserting them into
the cells.
is there anything else you can think of
thank you for your continued assistance
brock

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default scrolling target cell to top of page after hyperlink

yes, this example worked for me
but i inserted the hyperlink into this spreadsheet
perhaps the reason it wont work on my other spreadsheet is because i
typed the hyperlink formula into the document so that i could copy it down
the page
perhaps if i showed you the formula im using it could help
my hyperlink formula reads
=hyperlink("#"&cell("address",sheet1!a1)"stk"&rept ("o",3-len(row()))&row())
i thank you for your time and perseverance
brock
spokane, wa

"Gary''s Student" wrote:

Our patience will be rewarded in the end.

I think we should start with the simplest possible example, get it to work
on that example, and then migrate to your final worksheet. That way we will
know that your version of Excel and its configuration are consistent with
this approach.

1. start with a fresh, brand new, worksheet.
2. select A1 in Sheet1 and pull-down:
a. Insert Hyperlink Place in this document B9
3. click the link to insure we get to B9
4. right-click the tab (sheet name) at the bottom and select View code
5. Paste this in:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Dim s As String
MsgBox ("re-scrolling")
s = ActiveCell.Address(ReferenceStyle:=xlR1C1)
Application.Goto Reference:=s, Scroll:=True
End Sub

6. Close the VBA window
7. Click the link and we should observe two things:
a. A message box will pop up €“ click o.k.
b. The jump and re-scroll should occur

--
Gary''s Student - gsnu200746


"BROCK8292" wrote:

normally i just go to toolsmacrovba then select the worksheet and go from
there.
im familiar with basic macros but have difficulty with the language when
trying to write my own. i tried doing it like you said but still cant get it
to work
perhaps i am explaining it incorrectly
i have 1000 hyperlinks in one spreadsheet whose targets are 1000
corresponding rows in a sheet 2. i then used a row adder macro to seperate
these corresponding rows by 49 rows each. when i use the hyperlinks, the
target row appears at the bottom of the screen and id like for it to appear
at the top of the screen. does that make sense?
im pretty new to this and i know i dont express my ideas as well as many of
the other users do
thank you for your patience and continued assistance
brock

"Gary''s Student" wrote:

Let's make sure the routine is in the correct area. It needs to go in the
worksheet code area:


It is very easy to install and automatic to use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you have any concerns, first try it on a trial worksheet.

If you save the workbook, the macro will be saved with it.


To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm




--
Gary''s Student - gsnu200746


"BROCK8292" wrote:

thanks for the response garys student
i tried pasting it in the code of either spreadsheet but neither worked
do you have any other ideas
thank you
brock

"Gary''s Student" wrote:

paste this small macro in the worksheet code area:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Application.Goto Reference:=ActiveCell.Address(ReferenceStyle:=xlR1 C1),
Scroll:=True
End Sub

be careful of the wrap
--
Gary''s Student - gsnu200746


"BROCK8292" wrote:

i am now trying to get the target cells of my hyperlinks to appear at the top
of the page instead of at the bottom. i know you answered this one in bill
elerdings post "execute macro after hyperlink" but i cant get it to work,
maybe because i wrote my hyperlink formulas instead of inserting them into
the cells.
is there anything else you can think of
thank you for your continued assistance
brock

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make hyperlink target scroll to the top-left of spreadshe Lori W. Excel Discussion (Misc queries) 5 January 11th 08 08:21 PM
Hyperlink target jacque Excel Discussion (Misc queries) 2 June 23rd 07 05:20 PM
Target cell reference moves when target is cut and pasted Illya Teideman Excel Discussion (Misc queries) 5 May 31st 07 11:34 AM
Set 'target' for hyperlink Techno~ Excel Discussion (Misc queries) 0 August 16th 06 04:29 PM
How to convert a hyperlink to its target full-text URL Excel Discussion (Misc queries) 2 July 7th 05 01:40 PM


All times are GMT +1. The time now is 01:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"