+ Reply to Thread
Results 1 to 2 of 2

How to display the user "locking" a workbook or an addin.

  1. #1
    Stefano Gatto
    Guest

    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. #2
    Registered User Ivan F Moala's Avatar
    Join Date
    10-25-2003
    Location
    Auckland, New Zealand
    Posts
    71
    This may help you ??

    http://www.xcelfiles.com/IsFileOpen.html
    Kind Regards,
    Ivan F Moala From the City of Sails
    \1

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1