Cleaning HD of consequences of VBA application object errors
Posted on 2013-05-25
I'm learning to create Application interactions between MS Visio and Excel in early binding. When I started creating application objects (visio, excel) I did not clean up the objects before closing, and Windows7 showed down a lot. Then I learned to clean up application objects before closing, eg in Visio code and for excel.application:
if NOT xlApp is Nothing then Set xlApp = Nothing
if Visio code creates xl.App and throws a bug before xl.App is cleaned up, does this adversely affect Windows7?
ought one to have
if NOT xlApp is Nothing then Set xlApp = Nothing in a beforeClose event in the visio ThisDocument module?
Finally, how does one maintain ones HD / Windows7 when these coding mistakes are made, and xlApp is not killed.
I try running the PC through Windows7 safe mode once or twice, and if that does not help speed up excel/visio, do a system restore to a restore point at which Windows was running faster.
What SHOULD I do?
Are there 'cleaning processes' I should use regularly in this connection?