PPT2000: Run-Time Error When Using the Execute Method (217702)



The information in this article applies to:

  • Microsoft PowerPoint 2000

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.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbbug kbcode kbinfo kbnofix kbprogramming KB217702