Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unknown COM status code error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Unknown COM status code error
Divers
Thread ID:
00312481
Message ID:
00312481
Vues:
141
John,

I keep getting an OLE error when trying to run an Excel macro using OLE Automation. I have searched everywhere for a solution and can't find anything. I was wondering if you've ever tried to run an Excel macro using VFP or VB.

I first tried an Auto_Activate macro. It worked fine if I opened the workbook using Excel, but when I used VFP 5.0 and OLE Automation to open the workbook it would not run the macro. So I renamed the macro to "Master" and tried to run it after the workbook was already open.

The macro actually runs but I get the following message afterward:
OLE error code Ox800a9c68: Unknown OLE status code

I tried it in VFP 6.0 and got this:
OLE error code Ox800a9c68: Unknown COM status code

Here is the code I'm using.

oEXCEL = CREATEOBJECT("Excel.Application")
oEXCEL.Workbooks.Open("MACROS.XLS")
oEXCEL.Application.Run("'MACROS.XLS'!Master")
oEXCEL.QUIT()
RELEASE oEXCEL

I did find a similar confirmed bug ("Unknown COM status code" With ActiveX Conferencing Control) that was corrected in Visual Studio 6.0 Service Pack 3.

Could this just be another bug?

Any help would be appreciated.

Thanks,
Mike Coop
MIU - Data Analyst III
Kemper a Unitrin Business
(904) 245-5949
mcoop@eKemper.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform