PPT2000: Run-Time Error When Using the Execute Method

ID: Q217702


The information in this article applies to:
  • Microsoft PowerPoint 2000


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 this to be a problem in the Microsoft products 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 : kbcode kbdta KbVBA
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug kbinfo


Last Reviewed: December 17, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.