Link to home
Start Free TrialLog in
Avatar of arapahoe
arapahoe

asked on

ActiveX component can't create object

I have visual basic program that calls to excel and save if html format a xls file.

When I execute it inside on cgi (with iis) gives the error "Error: 429 ActiveX component can't create object"
when execute the instruction 'Set objExcel = CreateObject("excel.application")' .... but the same procedure works if I execute it
in the environment of development of visual basic.

Why?

This is the code:

    Dim objExcel As Excel.Application
    Dim objBook  As Excel.Workbook
   
    Set objExcel = CreateObject("excel.application")
    objExcel.Visible = False
    Set objBook = objExcel.Workbooks.Open(FitxerOrigen)
    objBook.SaveAs FileName:=FitxerDesti, FileFormat:=xlHtml, ReadOnlyRecommended:=False, CreateBackup:=False
    objBook.Close False
    objExcel.Quit
Avatar of BigRat
BigRat
Flag of France image

Try
Set objExcel = Server.CreateObject("excel.application")



ASKER CERTIFIED SOLUTION
Avatar of BigRat
BigRat
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial