Hi Francine
Set .........= Nothing
Do you use this at the end of your macro???
--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl
"Francine Kubaka" wrote in message news:BW9db.6471$o21.4784@edtnps84...
I have a long Excel VBA sub which creates several ADO recordsets from
another open workbook in succession.
Upon completion, the sub closes the source workbook. Despite that, the VBE
still shows the source workbook open!
If I run the subroutine several times (and then close the source workbook
programmatically or manually), several instances of one and the same
workbook appear in the VBE. Eventually, the system runs out of resources and
the computer hangs.
I realize that I am failing to destroy one of the ADO objects somewhere but
I do kill the ADO connection, set the recordsets to Nothing etc.
What can I be possibly be doing wrong??
Thanks!
FK