
Using Excel object without installing Excel?
Hi,
I am wondering if it is possible to use the Excel object without installing
Excel.
Basically, the sample code below works fine on my PC:
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Add
Set xlSheet = xlBook.Worksheets(1)
But when I try running it on another PC, the error message "ActiveX
component can't create object" appears at the line above containing
CreateObject. I though I could just copy the MS Excel Object Library file
Excel9.olb to the other PC and everything would work. But I was wrong.
My objective is to write VB code to create an Excel file.
I did try other things. An alternative is to write code to create a
tab-delimited text file and save it with xls extenstion.
Can anyone help?
Thanks, Bob