You can test to see if a file is in use with this code

However I am not aware of a specific way to be able to tell WHO is locking the file. I know there are ways to keep track of that, I have seen it in server admin software, but I don't know of any specific way to do it from a client workstation in VB.