Help From KJBox for formula

  • Hi KJBox


    You assisted me yesterday with a code for my worksheet: I cant get the code to work so have taken it out and have attached the workbook for you to see if you can get it going! I've tried all sorts......heeeelp


    log in on opening is -


    Barrap


    Password


    Chuckles3


    to unlock sheet - 12345


    Code is Below


    No, but this will also lock the approve cell
    Code:

    Private Sub Worksheet_Selection(ByVal Target As Range) If Target.Row < 12 Or Target.Count > 1 Then Exit Sub If Not Intersect(Target, .Columns(15)) Is Nothing Then If Target = "APPROVE" Then Target.Offset(, -9).Resize(, 2).Locked = 1 Target.Locked = 1 End If End If End Sub

  • Barrap and Chuckles3 give "Incorrect Username or Password""

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • Try the attached. I assume that there will be additional sheets for additional employees so I have put the code in the ThisWorkbook Module, it will work on any sheet except the "Config" sheet.


    I have added the sheet protection word to the Config sheet in a cell that is a Named Range (Cell F1, named "pwd"), this used by the code, so if you change the password, remember to change F1 too!


    The sheet is currently unprotected, change O12 to "APPROVE" and F12 & G12 will get locked and the sheet will get protected.


    The code is

  • hi,


    wow, what can I say....it works brilliantly....im going to be a pain now....so sorry I forgot to ask on the last request....if a user has entered data in column L, again when Approve is selected this column needs to do the same as F12 and G12.


    You've been really helpful, how do I contribute payment wise to your site etc...I am more than happy to do this as the help has been phenominal. Ive attached file again. same user as before


    Paul

  • Should the cell in Column L be locked only if it contains data, otherwise left unlocked?

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

Participate now!

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