Microsoft KB Archive/318704

= FIX: Fatal Exception Error When You Use CreateObjectEx with Excel =

Article ID: 318704

Article Last Modified on 4/10/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 7.0 Professional Edition

-



This article was previously published under Q318704



SYMPTOMS
When you use the CreateObjectEx function to create an Excel.Application object, and you reference a property of the Excel.Application object, you may receive one of the following error messages:

In Microsoft Visual FoxPro 7.0:

Fatal error: Exception code=C0000005

-or-

Member ACTIVEDIALOG does not evaluate to an object.

In Visual FoxPro 7.0 Service Pack 1:

OLE error code 0x8002802b: Element not found.



RESOLUTION
To resolve this problem, obtain the latest service pack for Visual FoxPro for Windows 7.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

316964 How to Obtain the Latest Visual FoxPro for Windows 7.0 Service Pack



STATUS
Microsoft has confirmed that this is a problem in Microsoft Visual FoxPro for Windows 7.0.

This problem was first corrected in Visual FoxPro for Windows 7.0 Service Pack 1.



Steps to Reproduce Behavior
  Paste the following code in a program (.prg) file named Test, and then run the program from the Command window: SET RESOURCE OFF PUBLIC x AS Excel.Application x = CREATEOBJECTEX(&quot;excel.application&quot;,&quot;&quot;,;     &quot;{000208D5-0000-0000-C000-000000000046}&quot;) x.Quit x = CREATEOBJECTEX(&quot;excel.application&quot;,&quot;&quot;,;     &quot;{000208D5-0000-0000-C000-000000000046}&quot;) x.ActiveDialog.Comments x.Quit RELEASE x RETURN  Save and close the program. Run Test.prg from the Command window.

Keywords: kbbug kbfix kbvfp700sp1fix kbcodesnippet KB318704

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.