Forum Discussion

ZennaVB's avatar
ZennaVB
Copper Contributor
Feb 08, 2024
Solved

How to password protect Excel document for specific people

Hello Excel experts,   Simple question: Is it possible to protect an Excel worksheet with a password, but exclude a group of users from filling in a password. I can't find this option and can't fin...
  • JKPieterse's avatar
    JKPieterse
    Feb 08, 2024

    ZennaVB I would probably solve it like so:

    1. Password protect the file (I assume this is the password to open the file in edit mode, so without the password, you can open the file, but it will be read-only)
    2. In a separate Excel file which only the user has access to, write a macro like below.
    3. If the daily user wants to edit the file, simply open that file with the macro and click the button to open the file to edit.
    4. Other users can just open the file, it will open read-only

    See the video on the save-as, attached a sample workbook with a macro in the ThisWorkbook module which needs editing to update the file location and name and the password "test".

Resources