Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code which prevents the user to edit the cell A1 more
than once Private Sub Worksheet_Change(ByVal Target As Range) Dim Original As Variant Dim NewVal As Variant If Target.Count 1 Then Exit Sub If Target.Address = "$A$1" Then NewVal = Target.Value Application.EnableEvents = False Application.Undo Original = Target.Value If Original = "" Then Target = NewVal Else MsgBox "No change to this cell is allowed" End If Application.EnableEvents = True End If End Sub How do I edit this code to make it work for more than A1 i.e. A1:A100 Thanks Adam |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Locking from data entry but allowing oulining to function? | Excel Discussion (Misc queries) | |||
Allowing data entry in protected sheets | Excel Discussion (Misc queries) | |||
exel 2003 suddenly stopped allowing data entry | Excel Discussion (Misc queries) | |||
Allowing Data Entry ONLY??? | Excel Worksheet Functions | |||
Allowing only one entry in a range | New Users to Excel |