+ Reply to Thread
Results 1 to 4 of 4

Protect/lock cells after user input

  1. #1
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Protect/lock cells after user input

    Still learning and appreciate all the help ... Have a worksheet that will be used multiple times. User will enter name and employee number only on the first instance that the worksheet is opened. Would like to protect that info automatically for further usage. Most of the worksheet is protected but some cells need to remain unlocked so the "whole" sheet protection will not work. How do I protect only specified cells, say F3, G3, H3, I3, after the user enters data thru an input box without changing any other protected cells on the sheet? New enough that I need specific help, please. Code for user input:
    Please Login or Register  to view this content.

    Thank you for all your help - you all make me look like a genius at work for the simplest of things! :-)
    Last edited by pprseller; 01-12-2009 at 08:46 PM.

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    One way is to select the cells that you dont want locked - Not the cells that will hold the employee name & number

    Format Cells > Protection > Remove Tick from Locked option

    Then you can Protect & unprotect sheet as required

    Another option is using a macro that allows only certain cells to be selected
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    As Mudraker says you need to use Sheet protection correctly.

    First select all cells on the sheet by clicking the grey box -top left, the junction between between A & 1
    Format menu -> Cells -> Protect & uncheck Locked.
    Next select all cells for input & format them as Locked.
    Add a password -> Tools menu -> Protection-> Protect sheet.

    Then use this code
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Input / lock cells

    Thank you for your help. Very much appreciated.

+ 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