Locking Merged cells before save

Important Notice

Please note that on 14th December 2023 users will experience an expected outage whilst we make upgrades to our network. We anticipate this process may take a couple of hours and so we apologise in advance for any inconvenience.

  • I have a QC form that contains merged cells, I am not allowed to change the form. I need to lock the cells after data entry when saving, I have the following...

    In the attached file I have highlighted the cells that would require input, the highlights will return to "no fill" once the form is working.
    Password is blank for now.

    Thanks in advance for your help,


  • Re: Locking Merged cells before save

    try this

  • Re: Locking Merged cells before save

    Thanks for the quick reply, the code works for the initial save, subsequent saves results in...
    Runtime error "1004"
    Unable to set the locked property of the range class
    Debug line

    Activesheet.Usedrange.Locked = False
  • Re: Locking Merged cells before save

    use unprotect first and then try to lock the cell i thought you will modify my code so i havent used unprotect in the first place.

  • Re: Locking Merged cells before save

    A little info on this form, this form goes around the office to several different users, we do not want users editing someone elses remarks. The first user will initiate the form, that data needs to be uneditable by the next user and so on.
    The VP of Quality will hold the password for changes deemed necesssary.

  • Re: Locking Merged cells before save

    For those looking for the working code, here it is...Thank you ASHU1990, couldn't have done it without you.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!