Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Dec 2002
    Location
    Bruges, Belgium
    Posts
    122
    Thanks
    14
    Thanked 2 Times in 2 Posts

    Password protect code modules (2002 XP)

    I just released into the department an excel workbook that has several code modules attached to it (at the workbook and worksheet level as well as standard support modules). Is there any way I can Password protect these modules, so that an intelligent user (yes, they exist) cannot tamper with the code? I do not want the application itself be Password protected.

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

    Re: Password protect code modules (2002 XP)

    Activate the Visual Basic Editor (Alt+F11)
    Select Tools | VBAProject Properties... (if you have changed the name of the VBA project in your workbook, this will be reflected in the menu item.)
    Activate the Protection tab.
    Tick the "Lock project for viewing" check box, and enter the password you want to set in both boxes below. Then click OK.

    I don't know how secure this protection is.

    There is no password that you can set at the module level.

  3. #3
    2 Star Lounger
    Join Date
    Dec 2002
    Location
    Bruges, Belgium
    Posts
    122
    Thanks
    14
    Thanked 2 Times in 2 Posts

    Re: Password protect code modules (2002 XP)

    Thanks Hans. Your answer (I should have thought of it myself) is sufficient for my purposes. Password protection is never rock solid, but I was just looking for an additional barrier to access the code.

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password protect code modules (2002 XP)

    Excel's password protection is not even pebble solid.
    Legare Coleman

  5. #5
    Star Lounger
    Join Date
    Mar 2003
    Location
    Sydney, New South Wales, Australia
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password protect code modules (2002 XP)

    You can buy a utility which can easily remove VBA password protection. But luckily most users wouldn't know wheer to start.

Posting Permissions

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