ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   protecting a worksheet (https://www.excelbanter.com/excel-programming/378934-protecting-worksheet.html)

HSalim[MVP]

protecting a worksheet
 
I have a worksheet that is is being proteted in code - in the workbook open
event.
This was working well till recently - Users could only click on the cells
that were unprotected.

Now, users can click on any cell. What have I done wrong?

Thanks in advance for your advice

Habib



--
www.DynExtra.com
A resource for the Microsoft Dynamics Community
Featuring FAQs, File Exchange and more
Current member count: 40
--------------------------------------------
Share your knowledge. Add your favorite questions and answers
Help add questions to this site! We want Your input.
--------------------------------------------



Norman Jones

protecting a worksheet
 
Hi Habib,

'---------------
I have a worksheet that is is being proteted in code - in the workbook open
event.
This was working well till recently - Users could only click on the cells
that were unprotected.

Now, users can click on any cell. What have I done wrong?
'---------------

Post the protection code.


---
Regards,
Norman



HSalim[MVP]

protecting a worksheet
 
Thanks! that should do it - I'll try it tonight and post an update
Regards
Habib

--
www.DynExtra.com
A resource for the Microsoft Dynamics Community
Featuring FAQs, File Exchange and more
Current member count: 40
--------------------------------------------
Share your knowledge. Add your favorite questions and answers
Help add questions to this site! We want Your input.
--------------------------------------------
"John Bundy" wrote in message
...
add xlUnLockedCells

With Worksheets(1)
.EnableSelection = xlUnLockedCells
.Protect Contents:=True, UserInterfaceOnly:=True
End With

this will not allow selection of protected cells

-John

"HSalim[MVP]" wrote:

I have a worksheet that is is being proteted in code - in the workbook
open
event.
This was working well till recently - Users could only click on the cells
that were unprotected.

Now, users can click on any cell. What have I done wrong?

Thanks in advance for your advice

Habib



--
www.DynExtra.com
A resource for the Microsoft Dynamics Community
Featuring FAQs, File Exchange and more
Current member count: 40
--------------------------------------------
Share your knowledge. Add your favorite questions and answers
Help add questions to this site! We want Your input.
--------------------------------------------







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

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