+ Reply to Thread
Results 1 to 3 of 3

how can i lock cell immediately if any value Entered?

Hybrid View

Guest how can i lock cell... 08-20-2005, 12:05 PM
Guest Re: how can i lock cell... 08-20-2005, 03:05 PM
Guest Re: how can i lock cell... 08-20-2005, 07:05 PM
  1. #1
    Sureshsmartdc
    Guest

    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. #2
    JethroUK©
    Guest

    Re: how can i lock cell immediately if any value Entered?

    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:

    Tools>Protection>Protect Sheet

    to disable all locked cells

    "Sureshsmartdc" <Sureshsmartdc@discussions.microsoft.com> wrote in message
    news:07911F9F-AFDD-4627-A02F-BCC7497A2C46@microsoft.com...
    > 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. #3
    Gary's Student
    Guest

    Re: how can i lock cell immediately if any value Entered?

    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:
    >
    > Tools>Protection>Protect Sheet
    >
    > to disable all locked cells
    >
    > "Sureshsmartdc" <Sureshsmartdc@discussions.microsoft.com> wrote in message
    > news:07911F9F-AFDD-4627-A02F-BCC7497A2C46@microsoft.com...
    > > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1