Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jan 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    read only VBA code (2000)

    Does anyone know of any VBA code that will make a Visio document read only?

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: read only VBA code (2000)

    When do you want the file to be read only? Does it have to happen to a file before it is opened or should it happen only after the file is opened and the user chooses to run the macro?

    Is there a reason that you don't want to do this simply with the windows file attributes?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    New Lounger
    Join Date
    Jan 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: read only VBA code (2000)

    I want to give others access to the document for a limited amount of time. Afterwards, I want to prohibit any changes to it.

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

    Re: read only VBA code (2000)

    I do not have Visio, but you would do something like the following in Word.
    Perhaps, Visio offers a similar capability.

    You would need to build some protection into, say, the document open event.
    You would need to validate passwords and check dates.

    In VBA, you would have to password protect the VBA code, but such passwords are easily broken.

    You could design the code so that the critical code is in a VB 6 DLL. This protects the code.
    However, once somebody breaks the VBA Project pasword, u r outta luck, as they could remove all code that uses the DLL.

    Using VBA, especially via a DLL, would discourage most, but it's not 100% secure.

Posting Permissions

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