Results 1 to 1 of 1

locking a cell after data imput

Threaded View

  1. #1
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    locking a cell after data imput

    I found this code and was wondering if someone could help me get it to work. and also answer a few questions about its capabilities.

    Private Sub Worksheet_Change(ByVal Target As Range)
    
    If Not Intersect(Target, Range("b1:b10")) Is Nothing Then
    
        If Target.Locked = False Then
        ActiveSheet.Unprotect "xxx"
        Target.Locked = True
        ActiveSheet.Protect "xxx"
        End If
        End If
    
    End Sub
    I need it to be; if sheet 2 A1= sheet1 A1 then lock b1.
    Attached Files Attached Files
    Last edited by Leith Ross; 12-14-2011 at 09:58 PM. Reason: Added Code Tags

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