Consulting

Results 1 to 5 of 5

Thread: Solved: VBA Password Protection

  1. #1

    Solved: VBA Password Protection

    Hi all,

    Whats the best way to protect VBA code from being seen or altered. Right now the workbook is protected but is there a way to hide/secure the code from being altered?

    thanks

  2. #2
    VBAX Tutor
    Joined
    Nov 2006
    Location
    North East Pennsylvania, USA
    Posts
    203
    Location
    gimli,

    Open your workbook
    Press the keys ALT + F11 to open the Visual Basic Editor

    Click on Tools
    VBAProjectProperties...
    Click on the Protection tab
    Click in the box for Lock project for viewing
    In the Password to view project properties box
    Enter a password in the two boxes for Password, and Confirm password
    Click on the OK button

    Do not forget your password, and save your workbook.

  3. #3
    Ahhh excellent! Thanks much

  4. #4
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,058
    Location
    Excel's protection is very basic, and easily broken, so the harsh reality is this - Just who are you "protecting the workbook from"?

    There far too many commercial products currently available, which break protection. So if someone has a will to do so, then it'll be done. Protection is something that Microsoft has been unable to come to grips with at this point.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  5. #5
    Its for intra company use only..not a large threat. Just wana make sure that curious people cant change stuff on purpose or by accident...

    So I think the basic protection will be just fine.

    thanks much

Posting Permissions

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