I am not a coder/programmer, but maybe this will help: http://help.solidworks.com/2016/english/api/
I didn't get an exact match when I searched for "IEdmFile lock" but it looked like there were a number of very close hits, including this one: 2016 SOLIDWORKS API Help - Add Files to Vault Example (C#)
I hope this helps. Good luck.
Thx for your quick answer, but I have check the help of the API, and I didn't found the good answer in VBA for Excel.
Thx for your help, but I'm in the same step...
I'm not a programmer either, but the LockFile and UnLockFile is part of the interface IEdmFile5:
I know a few years ago, i had a colleague who made a SOLIDWORKS macro, that calls an Excel file to import values from the Excel file into PDM. I don't know if the reason was that Excel could not work with PDM directly so we needed SOLIDWORKS to run the macro and the communication with PDM, but it could be.
The extremely short version of that macro is:
Dim oFile As EdmLib.IEdmFile5
And to Unlock (check in) the file object:
Call oFile.UnlockFile(0, "Checked in by import macro")
Maybe, hopefully, it can help you a bit further.