Run-time error '1004'
Hi,
I have created an excel object variable(objExcel) using CreateObject("Excel.Application"). I tried to published an excel file using this object which is having a pivot table, to a .htm file. When I am trying to execute the statment
objExcel.Application.ActiveWorkbook.PublishObjects .Add(xlSourcePivotTable, htmFile, "CI", "CI", xlHtmlList).Publish , it throws an error
Run-time error '1004':
Application-defined or object-defined error.
However, when I gave excel object reference and declared the object variable then it worked fine.
Can anybody provide solution for this problem.
Thanks & Regards,
Gogoi
|