+ Reply to Thread
Results 1 to 2 of 2

Locking cells

  1. #1
    Registered User
    Join Date
    05-21-2008
    Posts
    45

    Red face Locking cells

    How would I go about getting excel to lock a set of cells unless the previous ones are completed, perhaps indicating that you can proceed by a tick beside the previous cell

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Locking cells

    You can use a Worksheet_SelectionChange event in the in the VBA Sheet Module which watches the cell selections. Constructed properly, it could force the cursor BACK across a row to the cell requiring input before allowing access to then next empty cell.

    For instance, let's say the process goes like this:

    A1 then B1 then C1 then D1.

    Column A can be accessed anytime, but when your cursor tries to enter column B, the macro checks column A for any value... If one is found, column B access is allowed, if not...the cursor is pushed back to column A. This same behavior is repeated for C and D.

    Is this the sort of thing you had in mind?

    If so, describe fully the sequence of cells that require data in them to proceed to the next and I can help you construct a Worksheet_SelectionChange event macro.

    Using this would require you to have macros enabled on your sheet, hope that's ok.
    Last edited by JBeaucaire; 04-29-2009 at 08:48 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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