Hi. I have created a word merge document that takes some values (using vba) entered by users and opens up an excel spreadsheet and copies those values to the worksheet and saves it. The problem is that sometimes more than one user will be doing this and only one worksheet can be opened up at a time. If someone runs the letter and it opens up the excel spreadsheet when it is open at someone's computer already, is there some code I can use (i.e., an error code or something) that I can use in a loop so that the program will recognize that the spreadsheet is already open and loop through some numbers (i.e, so that will wait for a couple of seconds) and then test again to see if the spreadsheet can be opened...
I know exactly how I would do it, but I just need to error code (or something like that) that can be identified by the vba in word so that it can recognize that the excel spreadsheet is opened by someone else. Any help you can provide would be much appreciated!!
Thanks.
I know exactly how I would do it, but I just need to error code (or something like that) that can be identified by the vba in word so that it can recognize that the excel spreadsheet is opened by someone else. Any help you can provide would be much appreciated!!
Thanks.