PDA

View Full Version : freeze pan



lior03
09-11-2007, 12:46 AM
hello
i have a table which i wanted to scroll and keep the headline frozen.
i came up with this:

Sub SelectsecondRowOnly()
Dim vCols As Integer
Dim i As Integer
i = 1
selection.CurrentRegion.Select
vCols = selection.Columns.count
selection.Resize(i + 1, vCols).Select
ActiveWindow.FreezePanes = True
End Sub

how can i select the second row of a selection (assuming the first row is the headline) an freeze the window?
thanks

Bob Phillips
09-11-2007, 01:23 AM
Sub SelectsecondRowOnly()
Selection.CurrentRegion.Offset(1, 0).Resize(1, 1).Select
ActiveWindow.FreezePanes = True
End Sub