Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    password proteced vba code (Access 2000)

    Password protected VBA code


    Can somebody help me to write with code the password protection for the modules?I can do it by hand in the following way:
    1. open any module in design view
    2. choose Tools,ProjectNames Properties
    3. Mark the Lock object for viewing check box and type and confrim the pasword in the other text boxes.
    4. close and repoen the database.

    I will be very grateful if somebody can provide me the code i can wirte instead of the above manual actions.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: password proteced vba code (Access 2000)

    You asked about protecting modules in this thread as well. It would have been better to continue in a single thread rather than starting a new one. You can easily change the subject in a subsequent post, and it keeps the responses from being split into multiple threads. I'll lock the other thread, but try to avoid this kind of fragmentation in the future, please.

    Now, can you explain why you would want to do this in code? You would still have to close and reopen the database to have it take effect. Since this is a one-time action for the entire database, why do it in code?
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: password proteced vba code (Access 2000)

    I owe you an apology. I didnt read your answer and just sent my second question, and aactualy you have answerdet that.I see i may be confusing with other threads.
    So why do i need the code.The reason is i want to have a better comand on the actions.For example i want to change the messages, or to make the database close .
    Best regards

Posting Permissions

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