ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cell Protection (https://www.excelbanter.com/excel-programming/330952-cell-protection.html)

Teresa

Cell Protection
 
I have a range of cells D1:G16 with formulae in them, I want to ensure that
the user cant select these cells, how can I do this without any sort of
Password Protection.
I guess its a Private Sub Worksheet_Open()
If Target.Range = (D1:G16)...
.....
....
....

Thanks





Ron de Bruin

Cell Protection
 
Hi teresa

Try this event in the sheet module

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Range("D1:G16"), Target) Is Nothing Then
Range("C1").Select
End If
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"teresa" wrote in message ...
I have a range of cells D1:G16 with formulae in them, I want to ensure that
the user cant select these cells, how can I do this without any sort of
Password Protection.
I guess its a Private Sub Worksheet_Open()
If Target.Range = (D1:G16)...
....
...
...

Thanks







Teresa

Cell Protection
 
works fine - thanks Ron

"Ron de Bruin" wrote:

Hi teresa

Try this event in the sheet module

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Range("D1:G16"), Target) Is Nothing Then
Range("C1").Select
End If
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"teresa" wrote in message ...
I have a range of cells D1:G16 with formulae in them, I want to ensure that
the user cant select these cells, how can I do this without any sort of
Password Protection.
I guess its a Private Sub Worksheet_Open()
If Target.Range = (D1:G16)...
....
...
...

Thanks









All times are GMT +1. The time now is 12:44 AM.

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