View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Windows API to get network username of person with file open

You should be able to get away without APIs.
Open the workbook Read only, then check the WriteReservedBy property of the
workbook.


With ActiveWorkbook
If .WriteReserved = True Then
MsgBox "Opened by " & .WriteReservedBy
End If
End With


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Paul Martin" wrote in message
ups.com...
Hi

I am writing code to open another Excel file. If the file is in use by
another user, I would like to use an API function to return the network
username of the person who has the file open. Any suggestions?

Thanks in advance

Paul Martin Melbourne, Australia