Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way:
Put this in the worksheet code module: Private Sub Worksheet_Change(ByVal Target As Excel.Range) Const sPWORD As String = "drowssap" Dim rArea As Range Dim rCell As Range Me.Unprotect Password:=sPWORD For Each rArea In Target For Each rCell In rArea With rCell .Locked = Not IsEmpty(.Value) End With Next rCell Next rArea Me.Protect Password:=sPWORD End Sub In article , MIke wrote: I have a spreadsheet that I would like the cells to lock after a value has been entered. Can I do this with a macro or in the sheet code? Thanks Mike |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How lock just some cells | New Users to Excel | |||
Lock all cells? | Excel Discussion (Misc queries) | |||
How do I lock all cells in a given row together to one another? | Excel Discussion (Misc queries) | |||
how can I lock certain cells? | Excel Discussion (Misc queries) | |||
Lock Cells | Excel Discussion (Misc queries) |