+ Reply to Thread
Results 1 to 3 of 3

Thread: How do I lock the Column without Protecting the Sheet

  1. #1
    sgmoorthy
    Guest

    How do I lock the Column without Protecting the Sheet

    I want to Lock a Column without protecting the sheet.
    the user can enter anything in other columns but he/she should not alter
    anything
    in particular column that i locked

  2. #2
    Duke Carey
    Guest

    RE: How do I lock the Column without Protecting the Sheet

    Protecting the sheet is - by far - the easiest way, otherwise you must useVBA
    to capture and deny changes to that column. I think you'd have to be pretty
    elaborate, too, to trap all potential changes.

    "sgmoorthy" wrote:

    > I want to Lock a Column without protecting the sheet.
    > the user can enter anything in other columns but he/she should not alter
    > anything
    > in particular column that i locked


  3. #3
    Dave Peterson
    Guest

    Re: How do I lock the Column without Protecting the Sheet

    You could try to depend on a macro to stop them (like Duke wrote).

    But if the user disables macros or even just disables events, then this won't
    work.

    And depending on what alter means, it might not be sufficient. (Changing
    font/hiding the column/hiding a row won't get caught.)

    If you still want to try...

    Right click on the worksheet tab that should have this behavior and select view
    code. Paste this into the code window that you see:

    Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)

    If Intersect(Me.Range("C:C"), Target) Is Nothing Then
    Exit Sub
    Else
    With Application
    .EnableEvents = False
    .Undo
    .EnableEvents = True
    End With
    MsgBox "Please don't change column C--last change undone!"
    End If

    End Sub




    sgmoorthy wrote:
    >
    > I want to Lock a Column without protecting the sheet.
    > the user can enter anything in other columns but he/she should not alter
    > anything
    > in particular column that i locked


    --

    Dave Peterson

+ 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.2.0