The information in this article applies to:
SYMPTOMSAccording to Visual FoxPro Help, the following command will create a reference to a running instance of Microsoft Excel:
However, with Microsoft Excel version 7.0, this command can cause the
following error even if Microsoft Excel is running:
CAUSE
Previous versions of Microsoft Excel register the application object in the
OLE RunningObjectTable (ROT) on startup. This would happen under all
circumstances, whether Microsoft Excel was Launched using OLE or not.
RESOLUTIONIn Visual FoxPro, send a WM_USER+18 message to the Main window of Microsoft Excel to force Microsoft Excel to register itself in the ROT. STATUSThis behavior is by design. MORE INFORMATIONThe following code demonstrates how to create a reference to a running instance of Microsoft Excel 7.0:
For more information about using the function GETOBJECT() to reference
Microsoft Excel, please see the following articles in the Microsoft
Knowledge Base:
Q132535 Releasing Object Variable Does Not Close Microsoft Excel Q128994 Behavior of GETOBJECT()With Excel and Word For Windows Additional query words: VFoxWin kbinf CREATEOBJECT OLE automation
Keywords : kbcode kbVFp300 kbVFp300b kbVFp600 FxinteropExcel |
Last Reviewed: August 5, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |