Hi,
Not sure if I am in the right section. Just have a query about manipulating excel spreadsheet using vbscript.
I am developing a vbscript which runs on client xp machines to retrieve certain user environment variables and to write the same as a record on an excel spreadsheet placed on a network share where the user has got write access to. However, due to the massive number of users in the domain it is expected that the same excel spreadsheet is likely to be used simultaneously by more than one user during which time my script fails and the user encounters an unexpected 'save/save as' excel dialog which he/she was not expecting in the first place(the script is expected to run without the knowledge of the user who has logged on). This is caused due to the fact that the xls file is already opened by the script running on another user's machine.
So I am trying to come up with a piece of code where it waits in an infinite loop (i.e. Do{ ......wait in the loop ...... While(XLS is locked) ....continue.......) until the lock on the xls is released and then continues with the rest of the script operation. Is there any way to check this using vbscript?
Please note I have come across scripts that can do a lot of things when the spredsheet in question is present locally on the machine where a lot of things can be done but I haven't come across an example for the above scenario.
Any help/suggestions will be highly appreciated. Thanks in advance!