PDA

View Full Version : [SOLVED] Disallow workbook to be opened



Marcster
09-26-2005, 05:48 AM
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.

MWE
09-26-2005, 06:47 AM
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.

Marcster
09-28-2005, 05:28 AM
Is there anyway to disable the 'File in use' dialog?. :dunno
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.

Marcster
09-28-2005, 05:40 AM
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.