Consulting

Results 1 to 4 of 4

Thread: Disallow workbook to be opened

  1. #1
    VBAX Mentor Marcster's Avatar
    Joined
    Jun 2005
    Posts
    434
    Location

    Question Disallow workbook to be opened

    I have an Excel 2000 workbook on a server.
    As an idea I have:

    If say person A opens this workbook I don?t
    want anyone else to be able to open it (not even in Read Only mode)
    until person A has closed the workbook on their pc.
    I know about the ?File in Use? dialog,
    which states the workbook is locked for editing,
    which springs up if the workbook is already opened.
    But this still allows the workbook to be opened (in Read Only mode).

    Is it possible to bring up a user form,
    (which will not allow the user to proceed to open the workbook, just a picture and an OK button)
    instead of the ?File in Use? dialog?.

    If so, how?s this possible?.

    Thanks.

  2. #2
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location
    Quote Originally Posted by Marcster
    I have an Excel 2000 workbook on a server.
    As an idea I have:

    If say person A opens this workbook I don?t
    want anyone else to be able to open it (not even in Read Only mode)
    until person A has closed the workbook on their pc.
    I know about the ?File in Use? dialog,
    which states the workbook is locked for editing,
    which springs up if the workbook is already opened.
    But this still allows the workbook to be opened (in Read Only mode).

    Is it possible to bring up a user form,
    (which will not allow the user to proceed to open the workbook, just a picture and an OK button)
    instead of the ?File in Use? dialog?.

    If so, how?s this possible?.

    Thanks.
    not sure I can answer you immediate question (right now), but there may be another problem in what you are trying to prevent. I assume that you do not want multiple people modifying the file with all the resulting problems. But if user B accepts the read-only constraint, it really means that they can not save the file back to the original location with the original name. They can save it elsewhere with either the same name or some other name. Either way, the problem of multiple "originals" occurs.
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

  3. #3
    VBAX Mentor Marcster's Avatar
    Joined
    Jun 2005
    Posts
    434
    Location
    Is there anyway to disable the 'File in use' dialog?.
    Using Excel 2000.
    As i have a macro which returns True if the file is already open and False if it is not,
    I'm thinking about preventing the opening of the workbook if someone already has it open.
    If not, i'll just have to settle for the workbook to be 'read only' if the person opening it doesn't know the password.

    Marcster.

  4. #4
    VBAX Mentor Marcster's Avatar
    Joined
    Jun 2005
    Posts
    434
    Location
    Don't think that's going to work either. As the dialog will pop up (if workbook is already opened) before running the macro.

    I'll just leave it password protected, read only.
    Marcster.

Posting Permissions

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