سؤال

I am trying to find out, using VBScript, the number of instances of a shared Excel file running on different systems.

Let's say the file is 'test.xls', and it is placed on a shared drive and different people are accessing it. I want to find out, using VBscript, from how many places this file has been opened.

OR

It will be very helpful if anyone can suggest a method to implement the semaphore concept using VBScript on an Excel file. That is, only one person can use the Excel file at a time.

هل كانت مفيدة؟

المحلول

http://msdn.microsoft.com/en-us/library/office/bb221986(v=office.12).aspx

Here you go... use the userstatus property to "Return a 1-based, two-dimensional array that provides information about each user who has the workbook open as a shared list"

Hope this helps, there is a code example in the link

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top