ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to make a row unscrollable (https://www.excelbanter.com/excel-programming/331717-how-make-row-unscrollable.html)

Man Utd

How to make a row unscrollable
 
I saw a worksheet make a row eg. row 15 that stay at that position, the rows
under this row can be scrolled up or down.



Patrick Molloy[_2_]

How to make a row unscrollable
 
this is basic stuff

menu: Windows / Split
Windows / Freeze Panes

start the recorder, split & freeze,stop recording, read the code, amend as
required


Sub Freezer()
With ActiveWindow
.SplitRow = 14
.FreezePanes = True
End With
End Sub


"Man Utd" wrote:

I saw a worksheet make a row eg. row 15 that stay at that position, the rows
under this row can be scrolled up or down.




Nigel

How to make a row unscrollable
 
I think you are referring to Window-Freeze Pane option. Select the row
below the one you wish to freeze, in this case row 16 and choose
windows-freeze panes. You can also freeze vertically by selecting a
column or both horizontal and vertically by selecting a cell.

Chose the same option to reverse (windows-Unfreeze pane)

In VBA you can use,

'turn on
Rows("16:16").Select
ActiveWindow.FreezePanes = True

'turn off
ActiveWindow.FreezePanes = False

You do not need to select the row to turn freeze off, but you do need to
specify the worksheet or make it the active worksheet. If the active sheet
is a chart sheet you will get an error.

--
Cheers
Nigel



"Man Utd" wrote in message
...
I saw a worksheet make a row eg. row 15 that stay at that position, the

rows
under this row can be scrolled up or down.






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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com