Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reference blues
Message
From
10/04/2002 10:27:03
 
General information
Forum:
Microsoft Office
Category:
Access
Title:
Miscellaneous
Thread ID:
00642676
Message ID:
00643170
Views:
12
Seems like some of Excel's type libraries or automation DLLs got hosed, you might want to go through the "Repair" option in the Office installer (from Add/Remove programs).

As far as MDAC in W2K the other option is to install a newer version than what you have. If you try anything less it will give you the message you are seeing about MDAC being already installed.

>
>We are using Office XP.
>
>Both Microsoft DAO 3.6 object library and microsoft activex ata objects 2.5 library are checked in the references in Excel and in Access. The physical files pointed to in my computer are the same as in other computer where this does work.
>
>I get
>
>run time error 430
>class does not support operation or does not support expected interface.
>
>As you can see I pass a DAO object to this sub.
>
>Execution stops at the line
>
>
> nL = oWr.CopyFromRecordset(oRS)
>
>
>Note that this works on all the computers but mine. And it stopped working when I installed C#.net. As I told you I solved this kind of problem earlier by reinstalling MDAC, but on W2K this is not an option anymore, because it's included in the OS (that's the message that is diplayed when I try to reinstall mdac).
>
>
>Sub genPeriodicalSales(lPrintXLS As Boolean, lSaveXLS As Boolean, oRS As DAO.Recordset)
>Dim oxl As Excel.Application
>Dim cTemplate As String
>Dim cSaveAs As String
>Dim oXLTemplate As Object
>Const cXLS = "HavanaTurnoverReport.XLS"
>Dim nL As Long
>Dim oWr As Range
>
>Set oxl = CreateObject("Excel.Application")
>oxl.Visible = True
>cTemplate = cDataFolder & "xls\" & cXLS
>cSaveAs = cPrintFolder & cXLS
>oxl.Workbooks.Open (cTemplate)
>XLS.ExtendRange oxl, "Report", "report", oRS.RecordCount
>With oxl.ActiveSheet
> .Range("DateOfExtraction") = "As on " & Format(Now(), "dd/mmm/yy hh:mm")
> Set oWr = .Range("report")
> nL = oWr.CopyFromRecordset(oRS)
> .Range("Report2") = nNetCount
> .Range("Turnover") = nNetTurnover
> If nNetCount > 0 Then
> .Range("AvgPrice") = nNetTurnover / nNetCount
> .Range("NetCost") = nNetCOGS / nNetCount
> .Range("NetNTC") = nNetAmount / nNetCOGS
> Else
><snip>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform