Locking non-Validation cells in ranges

S

Sandy

Having trouble getting the following to do.
Any advice would be good.
Sandy

Dim rngPossibleValidation As Range
Dim rngValidation As Range

Set rngPossibleValidation = Range
("O4,05,C14:K14,M14:U14,C15:K15,M15:U15,C21:K21,M21:U21,
C23:K23,M23:U23,C27:K27,M27:U27,C33:K35,M33:U35,C39:K41,
M39:U41,C53:K53,M53:U53,C56:K56,M56:U56,C59:K59,M59:U59")

rngPossibleValidation.Cells.Locked = True

Set rngValidation = Cells.SpecialCells(xlCellTypeAllValidation)
rngValidation.Cells.Locked = False
 
S

Sandy

Oops - just realised i have posted this in the wrong group - sorry. I will
repost in the correct area with a little more info
Sandy
 
Top