+ Reply to Thread
Results 1 to 4 of 4

Password protect for multiple cell

  1. #1
    Registered User
    Join Date
    09-10-2021
    Location
    México
    MS-Off Ver
    2016
    Posts
    6

    Password protect for multiple cell

    I have a problem, In the past I did a VBA to protect a single cell with a password and now I want to do the same thing with multiple cells, the problem is that I don't know how to adapt this to more cells:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If ActiveCell.Address = Range("A10").Address Then
    pword = InputBox("Enter Password To Edit State:")
    If pword = "supslp2020" Then ActiveCell.Select Else ActiveCell.Offset(1,0).Select
    End If
    End Sub

  2. #2
    Valued Forum Contributor unit285's Avatar
    Join Date
    10-29-2015
    Location
    TN
    MS-Off Ver
    Office 365
    Posts
    358

    Re: Password protect for multiple cell

    Could make a list of cells you want locked? - Attached a sample
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-10-2021
    Location
    México
    MS-Off Ver
    2016
    Posts
    6

    Re: Password protect for multiple cell

    It really works.

    Thank you.

  4. #4
    Valued Forum Contributor unit285's Avatar
    Join Date
    10-29-2015
    Location
    TN
    MS-Off Ver
    Office 365
    Posts
    358

    Re: Password protect for multiple cell

    Quote Originally Posted by ang3lb3ltran View Post
    It really works.

    Thank you.
    Glad it works! Once done with this thread don't forget to set it to Solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Protect multiple pdf with different password from Excel at once using VBA
    By srglt332 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-30-2021, 07:56 AM
  2. [SOLVED] how to password protect a multiple tab in a workbook in excel
    By MetteGaga in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-05-2017, 10:29 AM
  3. Replies: 4
    Last Post: 09-01-2017, 06:36 AM
  4. Protect/Un-protect multiple sheets with password using VBA
    By Max_excel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-22-2013, 02:59 AM
  5. Password protect worksheet for multiple users
    By Crüe in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-03-2011, 04:15 AM
  6. Password Protect Multiple Sheets
    By Jonathan78 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-08-2011, 02:27 AM
  7. Password Protect - Multiple Passwords
    By aspears in forum Excel General
    Replies: 0
    Last Post: 12-08-2008, 01:12 PM

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