I have an Excel file A on my server that reads live data. Via a macro, a different Excel file B is opened every 20 minutes, specific cell ranges are copied over from the original file A and then Excel file B is closed.
This stops working when, presumably, someone else is querying Excel file B (via asp script) as I receive a 'can't save Excel file B because the file is read-only' error message. The more serious issue is that the code in Excel file A is paused because of the 'read-only' error so I don't have the live data stored in Excel file A after the error message.
I'm using a simple [ActiveWorkbook.Save ActiveWindow.Close] code to save and close Excel file B.
Is there a way to change the code such that the 'read-only' error is ignored and the code in Excel file A continues to run regardless of any save/close error in Excel file B?
Thanks
This stops working when, presumably, someone else is querying Excel file B (via asp script) as I receive a 'can't save Excel file B because the file is read-only' error message. The more serious issue is that the code in Excel file A is paused because of the 'read-only' error so I don't have the live data stored in Excel file A after the error message.
I'm using a simple [ActiveWorkbook.Save ActiveWindow.Close] code to save and close Excel file B.
Is there a way to change the code such that the 'read-only' error is ignored and the code in Excel file A continues to run regardless of any save/close error in Excel file B?
Thanks