Printing from another app - networkdays won't calculate?


Posted by vern on April 25, 2001 1:47 PM

I am dumping data from another program into excel and doing some calculations and then printing. The problem is that the "Networkdays" function which is part of the data analysis add-in will not seem to work. If I have the spreadsheet save and close with the data in there, when I open the file in Excel manually it works fine, but if I send the print command from my other program it errors out and just prints "#NAME?" error anywhere that the "NetworkDays" function is called. My theory is that when I am calling the instance of Excel from the other app, it is not loading the add-in, and therefore it errors out. My question is based on this assumption. If I assume properly, does anyone know how I would call the add in to be loaded when calling the instance of Excel from the other app? Any help would be greatly appreciated.



Posted by Dave Hawley on April 25, 2001 4:50 PM

Hi Vern
That would be the reason alright! here is the code to install it:

Sub InstallAddIn()

AddIns("Analysis ToolPak").Installed = True
End Sub

OzGrid Business Applications