In another thread, Poizhan showed me how to kill any Firefox processes that might be locking the files/folders i need to move.
Dim oServ As Object
Dim cProc As Variant
Dim oProc As Object
Set oServ = GetObject("winmgmts:")
Set cProc = oServ.ExecQuery("Select * from Win32_Process")
For Each oProc In cProc
If UCase(oProc.Name) Like "*FIREFOX*" Then
Call oProc.Terminate
End If
Next
To move them i use:
Name strOrigPath As strNewPath
where strOrigPath and strNewPath are variables that hold the proper path names.
I now find that strOrigPath can be locked up by other processes (Joy) and that my choice of arbitrarily shutting down my browser is not the best solution i could come up with (surprise).
Is there a VBA way to find out what processes are locking a folder/files so i can take those results and display them to the user, giving them the option to try to shut them down themselves?
As always, many thanks for your consideration!!!
Bookmarks