ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Is there a way to restrict the view of a worksheet (https://www.excelbanter.com/excel-worksheet-functions/244539-there-way-restrict-view-worksheet.html)

Romileyrunner1

Is there a way to restrict the view of a worksheet
 
Hi folks,
I want to set up a worksheet, so that only part of it can be seen / viewed .
Some scrolling will be necessary to see all the relavent parts, but the rest
I would like to stop viewing. (e.g. like a scroll lock limited to a specified
range of collumns / rows).
Any ideas guys?
RR1

Gord Dibben

Is there a way to restrict the view of a worksheet
 
You can hide unused rows and columns.

Or you can set the scrollarea to a range using VBA.

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:M36"
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:M36"
End With
End Sub


Gord Dibben MS Excel MVP

On Sun, 4 Oct 2009 08:27:01 -0700, Romileyrunner1
wrote:

Hi folks,
I want to set up a worksheet, so that only part of it can be seen / viewed .
Some scrolling will be necessary to see all the relavent parts, but the rest
I would like to stop viewing. (e.g. like a scroll lock limited to a specified
range of collumns / rows).
Any ideas guys?
RR1




All times are GMT +1. The time now is 07:43 PM.

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