Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to set validation/event on every cell in a column that input
can be entered only once, i.e. if I enter 2005-05-26 in a cell it is fixed and cannot be changed?? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There can be many ways but one approach could be the following. Paste the
code into the Sheet1's code Dim rng As Range Dim bHasValue As Boolean Private Sub Worksheet_Change(ByVal Target As Range) If Application.Intersect(Target, rng) Then If bHasValue Then Application.EnableEvents = False Application.Undo Application.EnableEvents = True End If End If End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Set rng = Application.Intersect(Target, Sheet1.Columns(1)).Cells(1) bHasValue = (rng.Value < "") End Sub Alok Joshi "Adam" wrote: Is it possible to set validation/event on every cell in a column that input can be entered only once, i.e. if I enter 2005-05-26 in a cell it is fixed and cannot be changed?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I lock a cell after data entry so entry can not be changed | Excel Discussion (Misc queries) | |||
Excel 2002 date entry: Cannot get away from d-m-yy entry format | Excel Discussion (Misc queries) | |||
Control Data Entry - push entry to next cell | Excel Discussion (Misc queries) | |||
Auto entry of data based on entry of text in another column or fie | Excel Discussion (Misc queries) | |||
Cell Entry That Locks Selected Cells From Any Data Entry. | Excel Worksheet Functions |