How do I stop a worksheet from scrolling?

R

rcomer123

I have two worksheets in a workbook that won't scroll with the scroll wheel.
How do I make the rest of the work sheets in the same workbook do the same
thing?
 
G

Gord Dibben

Window>Freeze Panes.

Play with setting the selected cell at various points.

Perhaps the worksheets that won't scroll have their scrollarea set by code.

Since the scrollarea method does not stick between sessions you will have to
reset it each time you open the workbook.

You may wish to place the code into a WorkBook_Open Sub in ThisWorkbook module
and specify which worksheet if only one sheet required.

Adjust the sheetname and range to suit.

Private Sub WorkBook_Open()
Sheets("YourSheet").ScrollArea = "A1:M56"
End Sub

Or also in the Thisworkbook module to limit scrollarea on all sheets.

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
With ActiveSheet
.ScrollArea = "A1:M56"
End With
End Sub


Gord Dibben MS Excel MVP
 
R

rcomer123

I unfreezed the panes and re-freezed them and now I can scroll on those two
workseets now. Now all I need to figure out is how to make them not scroll.
 
Top