have you tried using a timer to detect how long the macro has been running and if need be end or close excel
i doubt there is any less extreme method to terminate the code, though a stop statement may allow you to break all code in the IDE
i believe you may be able to change the timeout value for ADO, but if it is just hanging that may not make any difference