Microsoft KB Archive/217702

= PPT2000: Run-Time Error When Using the Execute Method =

Article ID: 217702

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft PowerPoint 2000 Standard Edition

-



This article was previously published under Q217702



SYMPTOMS
When you run the Execute method for the menu bar in the Visual Basic Editor (VBE), you may receive the following run-time error:

Run-time error '-21474677259'(80004005)':

Method 'Execute' of object 'CommandBarPopup' failed



CAUSE
When PowerPoint starts the Visual Basic Editor, it deactivates the menu bar. This behavior is different from earlier versions of PowerPoint that did not deactivate the menu bar when starting the VBE.

NOTE: This is only a problem when you run the code in VBE. If you run the code from within PowerPoint, it functions properly.



WORKAROUND
To work around this problem, use either of the following methods:
 * When you need to use the Execute method for the menu bar, do not run the macro from the Visual Basic Editor. Run the macro from within PowerPoint.

-or-
 * In your Visual Basic for Applications code, activate PowerPoint with Application.Activate before running the Execute method.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Additional query words: OFF2000 ppt2k 2k 2000 ppt powerpnt vba vbe visual basic applications error code insert method toolbar

Keywords: kbbug kbcode kbinfo kbnofix kbprogramming KB217702

-

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

© Microsoft Corporation. All rights reserved.