Results 1 to 5 of 5
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,948
    Thanks
    2
    Thanked 1 Time in 1 Post

    password protect a vba project (Excel 2002)

    Hi

    I am trying to password protect a vba project, so that users cannot read the passwords in some of the modules, I right click on the project and select properties go to the protection tab and enter a password, but I can still click on the expand box and see all the code.

    Where am I going wrong please?

    Thanks

    Braddy
    If you are a fool at forty, you will always be a fool

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: password protect a vba project (Excel 2002)

    You MUST tick the "Lock project for viewing" check box in addition to setting a password. If you omit to tick the check box, you will only protect access to the VBAProject Properties dialog, not to the code itself.

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,948
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: password protect a vba project (Excel 2002)

    Hi Hans

    I did as you suggested but I can still expand the projecct and see the code in worksheets and modules.

    thanks

    Braddy
    If you are a fool at forty, you will always be a fool

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: password protect a vba project (Excel 2002)

    You should close (and save) the workbook after protecting the VBA project. The next time you open it, the protection should work.

  5. #5
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,948
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: password protect a vba project (Excel 2002)

    Hi Hans

    Thanks very much once I saved and re-opened it was as you said working OK.

    Thanks very much.

    Braddy
    If you are a fool at forty, you will always be a fool

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •