LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Scrolling to top left corner when window panes are frozen

Hello world,

I have created a macro that scrolls all sheets of a workbook to the top left
corner (A1). Works as expected, however if the window of a sheet is set to
'Freeze panes', it doesn't.

I can see that Excel has a point: The top left cell is always visible when
panes are frozen, but I want the inner 'unfrozen' part to align to top left
as well. If I could determine the frozen area then I could handle these
cases by unfreezing - scrolling - refreezing, but I can't find a property
that would indicate the frozen range.

Example: If I activate B2, then do a Window = Freeze panes, then activate
the last cell in column B (B65536), the window shows A1 in the top left
corner, followed by A65503. I would like to show it A1, followed by A2. How
can I do it?

Here is the macro:

Sub ScrollToTopLeftCorner()
ActName = ActiveSheet.Name
For Each ws In Sheets
ws.Activate
ActiveWindow.ScrollIntoView 0, 0, 0, 0
Next
Sheets(ActName).Activate
End Sub


Thanks,

Joerg


 
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
Scroll bar disappears when panes frozen AIS Jay Excel Discussion (Misc queries) 0 March 30th 10 04:55 PM
Print Frozen Panes? CyberSockeye Excel Discussion (Misc queries) 2 April 23rd 08 10:23 PM
frozen panes jmack Excel Discussion (Misc queries) 2 May 11th 07 09:00 AM
Drop down list & frozen panes naive14 Excel Discussion (Misc queries) 3 February 9th 07 12:49 PM
How do I Hide frozen panes when printing? Stargiddy Excel Worksheet Functions 0 December 20th 05 06:10 PM


All times are GMT +1. The time now is 06:24 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"