I’m trying to use vbScript to open an excel application (I’m also going to do word).
Sub Btn1_onclick()
call OpenWorkbook("c:\temp\test.xls")
End Sub
Sub OpenWorkbook(strLocation)
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = true
objExcel.Workbooks.Open strLocation
objExcel.UserControl = true
End Sub
This code works in a .HTM file but not an .aspx file.
I get this error -
Microsoft VBScript runtime error: ActiveX component can't create object: 'Excel.Application'
Why wouldn't it work in an .aspx file?
Sub Btn1_onclick()
call OpenWorkbook("c:\temp\test.xls")
End Sub
Sub OpenWorkbook(strLocation)
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = true
objExcel.Workbooks.Open strLocation
objExcel.UserControl = true
End Sub
This code works in a .HTM file but not an .aspx file.
I get this error -
Microsoft VBScript runtime error: ActiveX component can't create object: 'Excel.Application'
Why wouldn't it work in an .aspx file?