Closing Excel: I'm working with Excel automation in a VBScript function. How can I close Excel at the end of the function?

We found and tested the following tip in

 http://tips-testing.blogspot.de/2008/12/closing-excel-instance-by-vbscript.html:

Function XL_close() 

 XL.ActiveWorkbook.Saved = True
 XL.ActiveWorkbook.Close
 XL.Application.Quit
 XL.Quit

End Function