Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking if an Excel Spreadsheet is open by an other User on network

Status
Not open for further replies.

zoodaddy

Technical User
May 13, 2010
10
US
Hi
I know how to check if an Excel application is open on the computer that is being used.

Set colprocesslist = _
objWMIService.ExecQuery("Select * from Win32_Process Where Name = 'Excel.exe'")

But how do you find out if a spreadsheet is open on a network server and what user has it open ?

Please help with an example
thankT
 
I'm sorry! I forgot to mention that I am looking for a VBscript example.
 
That's assumed because you posted in the VBS forum :) Unfortunately, I have no code for you.

It depends on how the file was opened by the other user/application as to whether or not the OS will let you open it. However, often times, the application will create a temp lock file (eg .~lock.filename.xls#). You could look at "that" network server to see if such file exists.

As for who has it open? I believe there is a property per process in colprocesslist that indicates this.

-Geates

"I hope I can feel and see the change - stop the bleed inside a feel again. Cut the chain of lies you've been feeding my veins; I've got nothing to say to you!"
-Infected Mushroom

"I do not offer answers, only considerations."
- Geates's Disclaimer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top