I have a file book1 that I am linking to book2 file. These files are on different PCs on a network. When a macro runs in book2 causing calculations to complete, I end the macro with ActiveWorkbook.Save. (It’s a long story, but I have to save book2 in order for the Edit/links... 'Update now', in book 1 to work).
In book1, I have a macro run 'Update now', every 5 minutes. That way, if the remote book, book2 has saved changes, book1 will get updated. However, if book2 happens to be performing a File/Save at the same time, book1 can't find the file and opens the File/Open window, so the user can manually look for the file. Since this macro runs on a unmanned PC, the entire operation stops and waits.
Since the two files are on different PCs, I can't sync the macros or write it all in one macro to avoid the conflict. I was wondering if there is code that can recognize when the File/Open window appears, and just cancel or esc out. Then loop back and run the 'Update now' command line again. The remote book2 only takes a couple seconds to save, so I would write delay code before looping back. I tried On Error Resume Next, but it really isn't an error, so that didn't work.
In book1, I have a macro run 'Update now', every 5 minutes. That way, if the remote book, book2 has saved changes, book1 will get updated. However, if book2 happens to be performing a File/Save at the same time, book1 can't find the file and opens the File/Open window, so the user can manually look for the file. Since this macro runs on a unmanned PC, the entire operation stops and waits.
Since the two files are on different PCs, I can't sync the macros or write it all in one macro to avoid the conflict. I was wondering if there is code that can recognize when the File/Open window appears, and just cancel or esc out. Then loop back and run the 'Update now' command line again. The remote book2 only takes a couple seconds to save, so I would write delay code before looping back. I tried On Error Resume Next, but it really isn't an error, so that didn't work.