Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Sureshsmartdc
 
Posts: n/a
Default how can i lock cell immediately if any value Entered?

I want lock a cell immediately when i entered a value. So that the user cant
change the value what he entered. But it should be done automatically. The
very next process of his entry it should be done.
  #2   Report Post  
JethroUK©
 
Posts: n/a
Default

not practical - you will type mistakes (i was going to say 'might')

you would need a macro to lock cells as you type, and when you finished
choose:

ToolsProtectionProtect Sheet

to disable all locked cells

"Sureshsmartdc" wrote in message
...
I want lock a cell immediately when i entered a value. So that the user

cant
change the value what he entered. But it should be done automatically. The
very next process of his entry it should be done.



  #3   Report Post  
Gary's Student
 
Posts: n/a
Default

Here is an example of pseudo-protecting a cell. This macro looks for changes
to cell A1. The first time data is entered, the Macro "remembers" the value.
If A1 changes after that, the macro will detect the change and restore A1 to
the "remembered" value. You can adapt it to your needs. The Macro should go
into the Worksheet code area.


Dim sval As Variant
Dim i As Integer
Sub Worksheet_Change(ByVal Target As Excel.Range)
If Intersect(Range("A1:A1"), Target) Is Nothing Then Exit Sub
Application.EnableEvents = False
If i = 0 Then
i = 1
sval = Range("A1:A1").Value
Else
Range("a1:a1").Value = sval
End If
Application.EnableEvents = True
End Sub

--
Gary's Student


"JethroUK©" wrote:

not practical - you will type mistakes (i was going to say 'might')

you would need a macro to lock cells as you type, and when you finished
choose:

ToolsProtectionProtect Sheet

to disable all locked cells

"Sureshsmartdc" wrote in message
...
I want lock a cell immediately when i entered a value. So that the user

cant
change the value what he entered. But it should be done automatically. The
very next process of his entry it should be done.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell color based upon cell value My View Excel Discussion (Misc queries) 11 July 6th 05 03:59 AM
Cell lock Adam Excel Worksheet Functions 1 April 18th 05 10:45 AM
up to 7 functions? ALex Excel Worksheet Functions 10 April 12th 05 06:42 PM
Syntax for inferred cell references donesquire Excel Worksheet Functions 4 April 4th 05 09:29 PM
lock a picture to a cell so i can mail merge lock picture to cell Excel Worksheet Functions 1 February 17th 05 11:00 PM


All times are GMT +1. The time now is 08:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"