ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Protecting cells with data validation (https://www.excelbanter.com/excel-programming/315811-protecting-cells-data-validation.html)

cottage6

Protecting cells with data validation
 
Hi,
I need to protect 3 cells that use data validation lists to let the user
select a choice. One group of people will be allowed to make the selections,
while the other group should not be able to make any changes in those 3
cells. I thought the code was relatively simple; it works fine in Excel XP
and changes can't be made. However, when I try it in Excel 2000, there is no
restriction on those cells. I need to make sure everything works in both
versions. Any ideas? Thanks!

Range("C2").Select
Selection.Locked = True
Range("C4").Select
Selection.Locked = True
Range("J2").Select
Selection.Locked = True
ActiveSheet.Protect Password:="vendorprotect", DrawingObjects:=True,
Contents:=True, Scenarios:=True



All times are GMT +1. The time now is 10:00 PM.

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