Error 430 when trying to do copyfromrecordset method in Excel

M

Mark

Using Access2000, Excel2000, DAO3.6 (version 3.60.3714.5 and 3.60.8618.0)

I created some Excel automation which, up until Friday, was working fine.
Now, I get the error "Runtime error: 430/ class does not support automation
or does not support expected interface"

It fails on the copyfromrecordset method.

Here is the relevant code:
Dim objexcel As Excel.Application
Dim objwkb As Excel.Workbook
Dim objsht As Excel.Worksheet
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set objexcel = New Excel.Application
Set objwkb = objexcel.Workbooks.Open(strTemplateFileName)
objwkb.Sheets("Data").Visible = True

Set objsht = objwkb.Worksheets("Enrollment")
objsht.Select
With objsht
Set rs = db.OpenRecordset("001 Qry Pipeline Enrollment")
.Cells(2, 1).CopyFromRecordset (rs) '<----fails here!!!
.Cells(1, 1).Select
End With
rs.Close
Set rs = Nothing

Our company did a security push, but I'm not sure what exactly went out and
if it's the cause of this issue (seems like it would be) or just
coincidental. When I googled for an answer, they said it might be a
DAO360.dll issue, but I'm not using the version they say has a bug in it.

Any ideas?
Thanks!
-Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top