ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Restrict cells selected to specific range name (https://www.excelbanter.com/excel-programming/437445-restrict-cells-selected-specific-range-name.html)

John

Restrict cells selected to specific range name
 
HI,

I would like to restrict selection of cells to only a range say the
dimensions of a range name. Is this possibly in VBA please.

EG My rangename is Weeks which is the range A1:B10 and i dont want any users
to access cells outside of this range. Hope that makes sense.

Thanks
JB

John

Restrict cells selected to specific range name
 
try using Scrollarea property

to set scrollarea

Worksheets(1).ScrollArea = "A1:B10"

to clear

Worksheets(1).ScrollArea = " "
--
jb


"John" wrote:

HI,

I would like to restrict selection of cells to only a range say the
dimensions of a range name. Is this possibly in VBA please.

EG My rangename is Weeks which is the range A1:B10 and i dont want any users
to access cells outside of this range. Hope that makes sense.

Thanks
JB



All times are GMT +1. The time now is 03:06 PM.

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