Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reference blues
Message
De
10/04/2002 10:27:03
 
Information générale
Forum:
Microsoft Office
Catégorie:
Access
Titre:
Divers
Thread ID:
00642676
Message ID:
00643170
Vues:
13
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>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform