I have this macro that takes a long time to run. When it’s done running, Excel become unresponsive and the Task Manager reports that Excel is using close to 100% of the CPU.
I just changed the macro recently so I know I screwed something up when I changed it. It turns out that I failed to close two ADODB Recordset objects. Oh, and these objects were in loops, so there was probably a lot of them left open. These two statements fixed the problem:
Set rsInvoice = Nothing