Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a list of cell addresses that I would like to build a macro for to
lock the cell when protection is enabled. The number of addresses that I have is very large, so I don't want to have to key in each address by hand. Can someone help me build a macro that will do this? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
by default, all cells are locked, so I assume you want to unlock all others
Activesheet.Unprotect Password:="ABC" Cells.Locked = False Range("A1,B9,C3:C5,F2,R32:Z29,M2,M5,M8").Locked = True Range("Z1,AB9,AC3:AC5,BF2,BR32:BZ29,AM2,AM5,AM8"). Locked = True Activesheet.Protect Password:="ABC" -- Regards, Tom Ogilvy "Kurt Barr" wrote: I have a list of cell addresses that I would like to build a macro for to lock the cell when protection is enabled. The number of addresses that I have is very large, so I don't want to have to key in each address by hand. Can someone help me build a macro that will do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Locking Cells | Excel Discussion (Misc queries) | |||
Locking Cells | Excel Worksheet Functions | |||
locking formula in cells in without locking whole sheet | Excel Discussion (Misc queries) | |||
Locking cells | Excel Discussion (Misc queries) | |||
Protecting and Locking a Mail Merge List | Excel Programming |