Interesting, the line doesn't appear to be something that should cause an error, but if timings were wrong and excel was blocking at the time, it could force the application to close anyway, which the OS (Windows) interpreted as an error for some reason.
The fact that you received errors after disabling them is just a sign that even M$ programmers are not all experts, lol.
Glad your problem is resolved