Solved

File in Use

Posted on 2006-11-05
8
143 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
8 Comments
 
LVL 27

Accepted Solution

by:
Ark earned 500 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now