Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get programmatically "file is locked .. " by whom?

Status
Not open for further replies.

rubinov

IS-IT--Management
Feb 12, 2004
6
0
0
US
In manual mode when you try to open the file, the dialog "File in Use" appears having "File is locked by 'user name'" message.

I use Excel Automation to work with Excel files. When the file is opened by another user, then the file is opened as a read-only. In this situation I would like to get programmatically the user name by whom file is used.
Something like:

if NOT oExcel.Workbooks.CanCheckOut(filename)
'*get the user name, how?
....



Thanks in advance

Yuri Rubinov
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top