[AccessD] Excel Graphs from Access Data - Ideas, Please

Tina Norris Fields tinanfields at torchlake.com
Mon Sep 25 10:37:03 CDT 2006


Hi Billy,

Very good point.  Thank you for bringing it up.  Got to take out the 
garbage and clean up after myself!

Thanks,
Tina

Billy Pang wrote:
> If you plan on going to the Access-Excel automation route, I found that it
> is good practice to destroy all the objects you create after you are done
> with them.  That is,
>
> Set xlSheet = nothing
>
> Also, reference your excel objects in its entirety to ensure that the
> objects are properly destroyed. For example, copying a worksheet...
>
> xlSheet.Copy after:=xlApp.Worksheets("Sheet1") <-- Good
>
> xlSheet.Copy after:=Worksheets("Sheet1") <-- Bad
> Otherwise, Set xlSheet = nothing will not work and the object will hang
> around, which may produce unexpected results.
>
> Billy
>
>
>   
>



More information about the AccessD mailing list