Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shared Workbook is "in use by another user" Sara M Excel Discussion (Misc queries) 3 December 4th 09 08:08 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How do I change the column heading in Excel to display "A" "B" "C Thai New Users to Excel 1 November 30th 07 08:06 PM
Password-Protected Workbook not showing "in use by another user" Jim Jackson Excel Discussion (Misc queries) 1 July 13th 06 03:11 PM
Function "User()" to provide access to workbook Wayne[_5_] Excel Programming 1 January 13th 04 02:06 AM


All times are GMT +1. The time now is 08:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"