ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA Detection of Workbook already Open (https://www.excelbanter.com/excel-programming/285264-vba-detection-workbook-already-open.html)

Nigel[_7_]

VBA Detection of Workbook already Open
 
I have a workbook that runs on a network and wish to
intercept if any user has the file open. At the moment
the standard Excel message appears with the option to open
it read only etc.

My intention is prevent users from doing anything if the
workbook is already open, display a message to this effect
and then close the file.

TIA
Nigel

Tom Ogilvy

VBA Detection of Workbook already Open
 
these show you how to check:


http://support.microsoft.com?kbid=138621
XL: Macro Code to Check Whether a File Is Already Open

http://support.microsoft.com?kbid=291295
XL2002: Macro Code to Check Whether a File Is Already Open

http://support.microsoft.com?kbid=213383
XL2000: Macro Code to Check Whether a File Is Already Open

http://support.microsoft.com?kbid=184982
WD97: VBA Function to Check If File or Document Is Open


--
Regards,
Tom Ogilvy

"Nigel" wrote in message
...
I have a workbook that runs on a network and wish to
intercept if any user has the file open. At the moment
the standard Excel message appears with the option to open
it read only etc.

My intention is prevent users from doing anything if the
workbook is already open, display a message to this effect
and then close the file.

TIA
Nigel





All times are GMT +1. The time now is 12:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com