bbiker wrote: > > I tried: > > > > xlApp.AddIns("Analysis ToolPak").Installed = true > > xlApp.AddIns("Analysis ToolPak - VBA").Installed = true > > >> greg.rb wrote: > but it didn't help. somehow we need to force the addin to actually > > load when creating the com object. > > > > later...until we find the answer... > > It appears that you first must uninstall and then re-install the > addin!!! > > Refer to the code below: > First run with open_book = 0 > > when prompted to navigate to where you want to store the workbook > ...should be as specified in xl_file > > then run with open_book = 1 > > in both cases the script runs as expected!!!! > PS I tried this on an excel workbook saved as an htm file. From what I can tell it works as expected. No need to open the htm file and save it as xls file.