L LRay67 Mar 28, 2008 #1 Is there a way to limit a user to a specific # of Rows & Columns upon opening the workbook/worksheet? Linda
Is there a way to limit a user to a specific # of Rows & Columns upon opening the workbook/worksheet? Linda
G Gord Dibben Mar 28, 2008 #2 You can set the scrollarea to a fixed range. 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
You can set the scrollarea to a fixed range. 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
L LRay67 Mar 28, 2008 #3 Thank You the 2nd scenario worked for us. Linda Gord Dibben said: You can set the scrollarea to a fixed range. 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 Click to expand...
Thank You the 2nd scenario worked for us. Linda Gord Dibben said: You can set the scrollarea to a fixed range. 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 Click to expand...