Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll the window to the top - frozen rows
After fooling around with this routine, I've discovered it wont always
select the correct cell. If a frozen pane (say, the column heading) is row 4 instead of row 1 then strange things happen. This routine should do the trick: Sub test() With ActiveWindow.Panes(ActiveWindow.Panes.Count) .SmallScroll Up:=Rows.Count, ToLeft:=Columns.Count .VisibleRange(1).Select End With End Sub -- Rob van Gelder - http://www.vangelder.co.nz/excel "Rob van Gelder" wrote in message news:... Sub test() Dim i As Long, j As Long i = ActiveWindow.SplitRow + 1 If i = 1 Then i = Selection.Row j = ActiveWindow.SplitColumn + 1 If j = 1 Then j = Selection.Column Cells(i, j).Select End Sub -- Rob van Gelder - http://www.vangelder.co.nz/excel "MDW" wrote in message ... Hey all, I've got some code that marches down a bunch of cells (about 700 rows) and applies formatting and formulas. When it's done, I want it to jump back up to the top. I was able to simply say ActiveWorksheet.Range("A1").Select to do what I wanted. However, I froze the first row because it contains column headers. Now I can't get the window to go back to the top. I've tried ActiveWindow.ScrollRow = 1 and ActiveWindow.ScrollRow = 2 (Only the first row is frozen). Neither of them work. Any ideas? -- Hmm...they have the Internet on COMPUTERS now! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
headers frozen so that when you scroll they stay | Excel Discussion (Misc queries) | |||
Scroll bar disappears when panes frozen | Excel Discussion (Misc queries) | |||
Frozen rows | New Users to Excel | |||
The top six rows are "frozen" and do not move when I scroll down.. | Excel Worksheet Functions | |||
Scroll the window to the top - frozen rows | Excel Programming |