ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to check for Exclusive access to a workbook (https://www.excelbanter.com/excel-programming/315760-how-check-exclusive-access-workbook.html)

Andy

How to check for Exclusive access to a workbook
 
Hi,
I've been trying this out for a while but am still scratching my head...

I need to check if an Excel Spreadsheet is already open by another user, so
that I don't open it if it is already being edited. Is there a way I can
determine this in Excel VBA?
I don't want the messagebox to come up stating that the sheet has macros
either, if this can be helped.

Many thanks in advance.
Andy

Tom Ogilvy

How to check for Exclusive access to a workbook
 



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

If you have use a macro to check, then the workbook doing the checking will
have a macro.


--
Regards,
Tom Ogilvy
"Andy" wrote in message
...
Hi,
I've been trying this out for a while but am still scratching my head...

I need to check if an Excel Spreadsheet is already open by another user,

so
that I don't open it if it is already being edited. Is there a way I can
determine this in Excel VBA?
I don't want the messagebox to come up stating that the sheet has macros
either, if this can be helped.

Many thanks in advance.
Andy





All times are GMT +1. The time now is 11:56 PM.

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