ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Navigating on a worksheet (https://www.excelbanter.com/excel-discussion-misc-queries/194088-navigating-worksheet.html)

Bill

Navigating on a worksheet
 
Hi,
I have a work sheet which I hope to us in my office.
All the necessary information is on the screen when the user opens the sheet.
Can I prevent the user from panning to the right, I know you can switch off
the scroll bars but this doesnt stop the user from panning to the right.
Similarly can I prevent the user from scrolling past a certain cell, say
cell 150.
Regards,

Harald Staff

Navigating on a worksheet
 
You can do this by running a very simple macro:

Sub RestrictTheWorkers()
Sheets(1).ScrollArea = "A1:M150"
End Sub

HTH. Best wishes Harald

"Bill" skrev i melding
...
Hi,
I have a work sheet which I hope to us in my office.
All the necessary information is on the screen when the user opens the
sheet.
Can I prevent the user from panning to the right, I know you can switch
off
the scroll bars but this doesnt stop the user from panning to the right.
Similarly can I prevent the user from scrolling past a certain cell, say
cell 150.
Regards,




Gord Dibben

Navigating on a worksheet
 
See Harald's reply about the scrollarea for a manually-run macro.

Or to automatically run..........................

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

You will 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:M150"
End Sub

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

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


Gord Dibben MS Excel MVP

On Tue, 8 Jul 2008 12:36:02 -0700, Bill wrote:

Hi,
I have a work sheet which I hope to us in my office.
All the necessary information is on the screen when the user opens the sheet.
Can I prevent the user from panning to the right, I know you can switch off
the scroll bars but this doesnt stop the user from panning to the right.
Similarly can I prevent the user from scrolling past a certain cell, say
cell 150.
Regards,




All times are GMT +1. The time now is 10:52 PM.

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