G Guest Jul 27, 2007 #1 I want to stop users being able to scroll through mouse in protected sheets. Can someone please help.
I want to stop users being able to scroll through mouse in protected sheets. Can someone please help.
G Gord Dibben Jul 27, 2007 #2 Might just be easiest to hide the extra rows and columns then protect the worksheet. But via VBA if you want to go that route....................... You can set the ScrollArea so users cannot move out of that area. Since the scrollarea method does not stick between sessions you will have to reset it each time. You may wish to place the code into a WorkBook_Open Sub in ThisWorkbook module and specify which worksheet if only one sheet required. Private Sub WorkBook_Open() Sheets("YourSheet").ScrollArea = "A1:M35" 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:M35" End With End Sub To unset this area................ Sub Scroll_All() Sheets("YourSheet").ScrollArea = "" End Sub Gord Dibben MS Excel MVP
Might just be easiest to hide the extra rows and columns then protect the worksheet. But via VBA if you want to go that route....................... You can set the ScrollArea so users cannot move out of that area. Since the scrollarea method does not stick between sessions you will have to reset it each time. You may wish to place the code into a WorkBook_Open Sub in ThisWorkbook module and specify which worksheet if only one sheet required. Private Sub WorkBook_Open() Sheets("YourSheet").ScrollArea = "A1:M35" 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:M35" End With End Sub To unset this area................ Sub Scroll_All() Sheets("YourSheet").ScrollArea = "" End Sub Gord Dibben MS Excel MVP
G Guest Jul 27, 2007 #3 Hey I am new to this. I can get a reply box but I can't a new question box? somebody help!