Creating a .XLS in VBA, I'm doing

ExcelApp.AddIns("Function").Installed = True

After I end the process and then open the .XLS from Windows's desktop,
I do, indeed, find that Tools|Add-Ins|Function has it's checkbox
checked.

Problem is that if I try to invoke one of the routines in "Function"
(not a great name for an add-in....but somebody else made it up...), I
get the dreaded #NAME? result.

But then if I open up Tools!Add-In, un-check 'Function', and open up
Tools|Add-Ins again and check Function, that same invocation of one of
the routines in 'Function' that was returning #NAME? suddenly works.

I'm guessing it's something to do with the state of the .XLS when I
issue the .AddIns("Function").Installed = True.

Anybody been here?