+ Reply to Thread
Results 1 to 2 of 2

How to auto lock a cell once data is entered

  1. #1
    Registered User
    Join Date
    06-08-2012
    Location
    India, rajasthan
    MS-Off Ver
    Excel 2010
    Posts
    1

    How to auto lock a cell once data is entered

    Dear All,

    I am willing to develop a format sheet which allows user to enter his information in given cell, but then after, that cell suppose to be auto locked after entering the data. one can't change the data once entered.

    my intention is to check and monitor actual performance of the team.


    waiting for response.

    Regards

    Thanks in advance

    Arvind pandey.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: How to auto lock a cell once data is entered

    The only way to lautomatically ock a cell after data entry is to use VBA.
    However, users have the option of choosing to enable macros when opening the workbook and if they choose to not enable them then *ANY* VBA code is defeated.
    The only way around that issue to set macro secutiry to allow macros to run without notification - this *IS NOT* recommended and most IT/administrators generally don't allow this.

    To use VBA code for this you must first unlock all cells into which you want to allow data entry. Cells are locked by default.
    Then you must apply worksheet protection - setting the options you want.

    Try adapting/testing this basic code:
    Note: sheet references in the code are to sheet code names - not worksheet (tab) names

    This code must go into the module named "Thisworkbook". It allows macros to run on a protected sheet.
    Please Login or Register  to view this content.
    This code must go into the module of the target worksheet
    Please Login or Register  to view this content.
    Adjust cell ranges as needed.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

+ 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