+ Reply to Thread
Results 1 to 2 of 2

Automatically Lock non-empty cells two times per day

  1. #1
    Registered User
    Join Date
    03-02-2012
    Location
    Washington
    MS-Off Ver
    Excel 2007
    Posts
    1

    Automatically Lock non-empty cells two times per day

    All,

    Thanks for reading this post! I know this topic has been beaten mostly to death, but I could not figure out how to implement the various code to fit my purposes.

    I have an equipment status log sheet. People fill out any broken equipment when they are finished using it. I have a macro that fills in a timestamp in column A on the row they are filling out, when they input their shift number. The user base is largely untrained in computer use, so basic protection of the data should be sufficient to eliminate people from altering previous shifts data. (this will prevent someone from one shift breaking a piece of equipment then logging it as broken during the previous shift.

    I need a macro that Locks all non-empty cells twice per day at shift changes (7am and 7pm). I have looked at other code that has been posted around that does automatic locking at a certain time, but I have been completely unsuccessful at adapting it to lock at 2 different times, neither of which are at midnight.
    Attached (hopefully) is a sample of the spreadsheet
    Any help is greatly appreciated.


    ForumHelpSTARprobe Equipment Status Data.xlsm

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Automatically Lock non-empty cells two times per day

    This modification of your WorksheetChange macro will unprotect the sheet allowing the insertion of the date then it will reactivate the sheet protection.
    You must set up all cells of your sheet except column A to be Unprotected then you set the sheet protection. This will allow users to add data in any cells except in column A which will always be protected. Will this work for you?
    Please Login or Register  to view this content.

+ 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