![]() |
How to display the user "locking" a workbook or an addin.
When a user opens a workbook stored on a shared folder, which is already open
by someone else, Excel notifies to the second user the name of the first user currently "locking" the file. This is quite practical, because it helps the second user find out who can release the file. Does someone know if there is a property in Excel's VBA that contains the name of the first user? I have tried WriteReservedBy, but this actually returns the name of the second user, not the first user locking the file... I need to use this property for an XLA, since as you might know, in the case the file is an XLA, Excel won't warn the second user as it does it for an XLS! My code (attempt): If ThisWorkbook.ReadOnly Then MsgBox _ "The application is currently in use by " & _ ThisWorkbook.WriteReservedBy & _ ". Please try later when the application will be released.", _ vbExclamation + vbOKOnly ThisWorkbook.Close End End If Thank you so much. -- Stefano Gatto |
How to display the user "locking" a workbook or an addin.
This may help you ?? http://www.xcelfiles.com/IsFileOpen.html -- Ivan F Moala ------------------------------------------------------------------------ Ivan F Moala's Profile: http://www.excelforum.com/member.php...fo&userid=1954 View this thread: http://www.excelforum.com/showthread...hreadid=547654 |
All times are GMT +1. The time now is 03:56 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com