The UDF itself does not contain code to close the Excel. I think that should be part of the UDF itself as it also opens Excel.
_________________________
There are two types of vessels, submarines and targets.