Solved

File in Use

Posted on 2006-11-05
8
145 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pull multiple cvs files into one access table 28 68
using Access 8 68
VBS file using code from 2nd file (txt or vbs) 4 36
vb6 connector to SQL Server 2 37
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…
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…

813 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

19 Experts available now in Live!

Get 1:1 Help Now