ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   who can help me??? (https://www.excelbanter.com/excel-programming/299944-who-can-help-me.html)

starwil[_2_]

who can help me???
 
i still have same the question :

how to lock the scrolling / movement of a cursor from a selected part, it
really annoying me......



Nigel[_8_]

who can help me???
 
Please don't multi post, attach it to previous threads on this topic
otherwise possible responses are lost and likely to cover the same ground
that other users have provided suggestions, answers or advice on.
Thank You
Nigel

"starwil" wrote in message
...
i still have same the question :

how to lock the scrolling / movement of a cursor from a selected part, it
really annoying me......





Greg Wilson[_4_]

who can help me???
 
To restrict scrolling to a contiguous range try:-
ActiveSheet.ScrollArea = "A5:J10"
(To unrestrict after restricting use empty quotation marks)

To restrict scrolling to a noncontiguous range:-
1) First unlock the cells you want to allow access to.
2) Set the worksheet EnableSelection property to
xlUnlockedCells.
3) Protect the worksheet.

For both of the above options, you'll have to reset these
conditions each time you open the workbook. To do so
programmatically use the Workbook_Open event in the
ThisWorkbook module:-

Private Sub Workbook_Open()
Sheets("Sheet1").ScrollArea = "A5:J10"
End Sub

Private Sub Workbook_Open()
Sheets("Sheet1").EnableSelection = xlUnlockedCells
End Sub

Minimal testing done.

Regards,
Greg

-----Original Message-----
i still have same the question :

how to lock the scrolling / movement of a cursor from a

selected part, it
really annoying me......


.



All times are GMT +1. The time now is 07:50 AM.

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