?
Solved

File in Use

Posted on 2006-11-05
8
Medium Priority
?
155 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month12 days, 22 hours left to enroll

777 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