Digita
05-19-2008, 12:44 AM
Hi guys,
I have a project that requires regular transfer of data from Access database into a big XL workbook. Due to extensive use of the networkday function, the anaylsis toolpak is required to be loaded. I have put the following lines at the start of my macro:
AddIns("Analysis ToolPak").Installed = True
AddIns("Analysis ToolPak - VBA").Installed = True
The macro halts half way through and reports a false error. I have spent a lot of time reviewing this rather long winded macro which also calls on various other subs within itself. However, I couldn't narrow down the problem. At the moment, before firing up the macro I have a temporary workaround. That is
1/ Load the toolpaks if they are not already or
2/ Unload and reload the add-ins if they are.
The macro runs OK if I use the above manual steps. Any ideas why this is?
Thanks in advance & regards
kp
I have a project that requires regular transfer of data from Access database into a big XL workbook. Due to extensive use of the networkday function, the anaylsis toolpak is required to be loaded. I have put the following lines at the start of my macro:
AddIns("Analysis ToolPak").Installed = True
AddIns("Analysis ToolPak - VBA").Installed = True
The macro halts half way through and reports a false error. I have spent a lot of time reviewing this rather long winded macro which also calls on various other subs within itself. However, I couldn't narrow down the problem. At the moment, before firing up the macro I have a temporary workaround. That is
1/ Load the toolpaks if they are not already or
2/ Unload and reload the add-ins if they are.
The macro runs OK if I use the above manual steps. Any ideas why this is?
Thanks in advance & regards
kp