Freezing panes and the top of the screen

  • Thread starter Thread starter gimme_this_gimme_that
  • Start date Start date
G

gimme_this_gimme_that

I'm writing a VBA Macro that will move the first row of the selected
range to row 4 and scroll the other rows and could use a tip ...


Now,


I have a worksheet where the first three rows are frozen ...


I'd to attach two buttons that should work like named anchor tags work
in HTML ...


When I click on the first button the row numbers should look like


1
2
3
100


And when I click on the other button the row numbers should look like


1
2
3
165


The numbers 100 and 165 correspond to the first row of a named rang -
but a solution
referencing row numbers works great.


Any suggestions?


Thanks.
 
I thought I'd add that

Range("A1").Select
Application.Goto Reference:=Cells(165, 1)

Is close to what I need, it's just that sometimes it places row 165
under the frozen cells but other times it makes row 165 the last
visible row.

Might there be a solution that uses Goto and then scrolls into position
if row 165 is the last row?

Thanks again
 

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

Back
Top