• Select Locked Cells (Excel 2002)

    Author
    Topic
    #407384

    I use the following code to protect my worksheets:

    For i = 1 To Worksheets.Count
    Worksheets(i).Unprotect Password:=strPasswd
    Next i

    My problem is that the user can still select locked cells even though he can

    Viewing 1 reply thread
    Author
    Replies
    • #851742

      Hi Jim

      When protecting the sheet add the following line.

      Worksheets(i).EnableSelection = xlUnlockedCells
      • #851758

        Perfect Tony! In an early post, I think it was your code I found to protect worksheets but didn’t know how to lock the cells. I appreciate your help!

      • #851759

        Perfect Tony! In an early post, I think it was your code I found to protect worksheets but didn’t know how to lock the cells. I appreciate your help!

    • #851743

      Hi Jim

      When protecting the sheet add the following line.

      Worksheets(i).EnableSelection = xlUnlockedCells
    Viewing 1 reply thread
    Reply To: Select Locked Cells (Excel 2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: