Results 1 to 6 of 6
  1. #1
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Protecting a project (VBA/Word/2003 SP2)

    Is it possible to protect a project through VBA code?

    I want to protect the code from changes by the user; however I need to interrogate the code itself, which requires that the project not be protected.

    T.I.A.
    Regards
    Don

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

    Re: Protecting a project (VBA/Word/2003 SP2)

    What do you mean by "I need to interrogate the code itself"? Do you as a person need to be able to view/edit the code, or does your code need to be able to do so?

  3. #3
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Protecting a project (VBA/Word/2003 SP2)

    The Code needs to.
    Regards
    Don

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

    Re: Protecting a project (VBA/Word/2003 SP2)

    As far as I know, VBA doesn't allow access to the VBA project's protection, for very good reasons - virus writers would <img src=/S/love.gif border=0 alt=love width=15 height=15> that! So I fear you're out of luck.

  5. #5
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Protecting a project (VBA/Word/2003 SP2)

    Hans
    Apologies for wasting your time. All I needed to do was declare a given constant as Public, and save a pile of code. <img src=/S/groan.gif border=0 alt=groan width=16 height=15>
    Thanks for your help.
    Regards
    Don

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Protecting a project (VBA/Word/2003 SP2)

    use a public variable and set the value at run-time.

Posting Permissions

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