Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default Freezing panes and the top of the screen

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default Freezing panes and the top of the screen

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Freezing panes and the top of the screen

Hi,
Try ActiveWindow.ScrollRow = 100

and ActiveWindow.ScrollRow = 165

Ken Johnson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default Freezing panes and the top of the screen

Thanks Ken.

Perfect.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Freezing panes and the top of the screen

You're welcome.
Thanks for the feedback.
Ken Johnson

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
freezing panes stew Excel Discussion (Misc queries) 3 September 21st 08 09:55 AM
Freezing Panes muerkilla New Users to Excel 3 April 4th 06 05:25 AM
Freezing Panes pknivens Excel Discussion (Misc queries) 2 October 13th 05 12:45 PM
Freezing panes LAF Excel Discussion (Misc queries) 1 September 16th 05 03:56 PM
Freezing panes Excel User leka Excel Worksheet Functions 2 November 3rd 04 07:16 PM


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

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

About Us

"It's about Microsoft Excel"