S
snsd
Hi:
I have a "no brainer" question for someone who knows what they're doing
- which I don't!!! Please see the attached file for details.
I have a list in alphabetical order with the first letter of each word
as a header in its own cell. eg. the letter "A" as the header for
words that start with "A".... Very similar to an address book where
you'd have the letter "A" followed by all the names starting with
"A"....
I recorded a macro for each letter of the alphabet so that when you
click on the letter, it searches for the letter header and selects that
cell. The macro is listed below for the letter "A".
As per the attached picture, the macro finds the cell perfectly, but
I'd like the cell to automatically be repositioned to the top of the
screen below row 3 (which I have frozen) so that I can see more of the
words listed instead of having to manually scroll down. I know that I
can record a macro that will scroll X number of lines up but when I add
new rows to my list, it obviously messes-up the desired effect.
Below is the macro I created.
What do I need to do to have the selected cell reposition itself at the
top of the viewable screen beneath the frozen row. Any help would be
greatly appreciated.
If it makes sense to scrap my current methodology and get the same
result differently, please let me know.
Thx,
Dave
Sub FindA()
'
' FindA Macro
' Macro recorded 10/27/2004 by 829980739
'
'
Cells.Find(What:="A", After:=ActiveCell, LookIn:=xlFormulas,
LookAt:= _
xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext,
MatchCase:= _
True).Activate
End Sub
+-------------------------------------------------------------------+
|Filename: MoveToTopOfScreen.jpg |
|Download: http://www.excelforum.com/attachment.php?postid=2742 |
+-------------------------------------------------------------------+
I have a "no brainer" question for someone who knows what they're doing
- which I don't!!! Please see the attached file for details.
I have a list in alphabetical order with the first letter of each word
as a header in its own cell. eg. the letter "A" as the header for
words that start with "A".... Very similar to an address book where
you'd have the letter "A" followed by all the names starting with
"A"....
I recorded a macro for each letter of the alphabet so that when you
click on the letter, it searches for the letter header and selects that
cell. The macro is listed below for the letter "A".
As per the attached picture, the macro finds the cell perfectly, but
I'd like the cell to automatically be repositioned to the top of the
screen below row 3 (which I have frozen) so that I can see more of the
words listed instead of having to manually scroll down. I know that I
can record a macro that will scroll X number of lines up but when I add
new rows to my list, it obviously messes-up the desired effect.
Below is the macro I created.
What do I need to do to have the selected cell reposition itself at the
top of the viewable screen beneath the frozen row. Any help would be
greatly appreciated.
If it makes sense to scrap my current methodology and get the same
result differently, please let me know.
Thx,
Dave
Sub FindA()
'
' FindA Macro
' Macro recorded 10/27/2004 by 829980739
'
'
Cells.Find(What:="A", After:=ActiveCell, LookIn:=xlFormulas,
LookAt:= _
xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext,
MatchCase:= _
True).Activate
End Sub
+-------------------------------------------------------------------+
|Filename: MoveToTopOfScreen.jpg |
|Download: http://www.excelforum.com/attachment.php?postid=2742 |
+-------------------------------------------------------------------+