Follow these steps in order to get rid of this error that happens when you close Internet Explorer.
Start Internet Explorer, go to tools > manage addons.
There, disable everything you find weird.
For me it was an addon from avast and something from Adobe called acroOEHlprobj.
Click on close and close the browser.
Start Internet Explorer again and close it, check if you see the error anymore.
This issue happened on Internet Explorer 8, on Windows XP.