G
Guest
I create a VBA function in Access 2000. Using Excel 2000 object model, this VBA function outputs Access data into an Excel 2000 file and runs OK on two computers. However, the following error messages shows up on the third computer -
**********************
Error number: 43
Description: Class does nt support automation or does not support expected interface
************************
All three computers have same configurations - WindowsXP and Office 2000. My VBA code successfully created Excel application object, workbook object, and worksheet objects. The error occured when the code ran to the following line
xlWks.range("A2").CopyFromRecordset rs
xlWks is the worksheet and rst is an ADO recordset
Strangely, on that computer with problem another VBA function using the "CopyFromRecordset" method of Excel worksheet works fine with a DAO recordset. Certainly, I do not want to change all my ADO code to DAO just for solving this problem
How do I fix the problem? I checked the reference and found out that the Excel libary is 9.0. I reinstalled Excel on the computer with problem but did not solve it.
Thanks in advance
Seapor
**********************
Error number: 43
Description: Class does nt support automation or does not support expected interface
************************
All three computers have same configurations - WindowsXP and Office 2000. My VBA code successfully created Excel application object, workbook object, and worksheet objects. The error occured when the code ran to the following line
xlWks.range("A2").CopyFromRecordset rs
xlWks is the worksheet and rst is an ADO recordset
Strangely, on that computer with problem another VBA function using the "CopyFromRecordset" method of Excel worksheet works fine with a DAO recordset. Certainly, I do not want to change all my ADO code to DAO just for solving this problem
How do I fix the problem? I checked the reference and found out that the Excel libary is 9.0. I reinstalled Excel on the computer with problem but did not solve it.
Thanks in advance
Seapor