Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a file that lives on a SP, that multiple users access through a
URL (in other words they don't use "check out" they just click the URL). I want a routine to run when they open the file that checks if the file is in use (in which case it will have opened automatically a read- only, it would seem). If it is in use, I want to return the name of the user that has it open. So far I have: -------------------------- myPath = ActiveWorkbook.Path myName = ActiveWorkbook.Name myUser = ActiveWorkbook.WriteReservedBy myFile = myPath & "\" & myName If Workbooks.CanCheckOut(myFile) = False Then 'assume is out with some other user MsgBox "File is in use by " & myUser, vbExclamation + vbOKOnly, ActiveWorkbook.Name End If ------------------------------- My problem is the "WriteReservedBy" property doesn't seem to give me what I want. Even though the file is loaded by me as read-only, it still gives my name instead of the real user who has that file open. This is driving me crazy - i've searched everywhere. Any ideas? Many thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Open Excel file from SharePoint; opens as ReadOnly | Excel Programming | |||
Open Sharepoint Hosted Excel File, in Excel, Using VBA | Excel Programming | |||
VBA Code to open an Excel file on a sharepoint site | Excel Programming | |||
User replaces existing file with blank during file open | Excel Discussion (Misc queries) |