?
Solved

File in Use

Posted on 2006-11-05
8
Medium Priority
?
161 Views
Last Modified: 2010-04-30
When a file is in use (.xls, .txt., .vbs. .exe, etc...), how can I see who has the file open?  My OS is Win XP Pro.
0
Comment
Question by:CCIG2006
5 Comments
 
LVL 28

Accepted Solution

by:
Ark earned 1500 total points
ID: 17879381
Private Sub Command1_Click()
   Dim WMI, wmiProcesses, proc, sOwner, sDomain
   Set WMI = GetObject("winmgmts:\\")
   Set wmiProcesses = WMI.InstancesOf("Win32_Process")
   For Each proc In wmiProcesses
      proc.GetOwner sOwner, sDomain
      Debug.Print proc.Name, "Owner: " & sDomain & "\" & sOwner
   Next
End Sub
0
 
LVL 10

Expert Comment

by:cool12399
ID: 17879388
0
 
LVL 1

Expert Comment

by:ThijsM
ID: 17887514
Perhaps you could use the following tool.  I couldn't find any code about this issue:
http://www.dr-hoiby.com/WhoLockMe/index.php

0
 

Author Comment

by:CCIG2006
ID: 18092705
My wife has recently passed away and I am trying to take care of everything.  Please allow an extension so athat I can review the answers within the next 2 weeks.  Your cooperation and understanding would be greatly appreciated.

Thank you kindly,
Mike.
0
 

Author Comment

by:CCIG2006
ID: 18381605
My wife has recently passed away and I am trying to take care of things.  I have not had time to review the answers, so I ask that you please allow more time.

Your cooperation is greatly appreciated.

Thank you,
Mike
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question