M
Mark
Hi all,
I posted this a few days ago, but lost connection to the newsgroups for some
reason (how does everyone else access the microsoft public newsgroups?).
Since I wasn't able to respond quickly at that point, I wanted to post again
to see if anyone could help.
I did get one response saying to use .CopyFromRecordset rs instead of
..CopyFromRecordset (rs), but that didn't help.
Anyway... (original post follows)
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
I posted this a few days ago, but lost connection to the newsgroups for some
reason (how does everyone else access the microsoft public newsgroups?).
Since I wasn't able to respond quickly at that point, I wanted to post again
to see if anyone could help.
I did get one response saying to use .CopyFromRecordset rs instead of
..CopyFromRecordset (rs), but that didn't help.
Anyway... (original post follows)
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