Microsoft KB Archive/264826

From BetaArchive Wiki

Article ID: 264826

Article Last Modified on 10/11/2006



APPLIES TO

  • Microsoft PowerPoint 97 Standard Edition



This article was previously published under Q264826

SYMPTOMS

When you run a macro in another Microsoft Office 97 program to try and start a slide show with Microsoft PowerPoint 97, the screen flickers and the show does not start.

Your Microsoft Visual Basic for Applications (VBA) code may include lines similar to the following:

   ...
   Set oPPT = CreateObject("Powerpoint.Application")
   oPPT.Activate
   ...
                

CAUSE

This problem occurs when you use the Activate method in a VBA macro to bring PowerPoint to the foreground. This method puts PowerPoint into a state that turns off the ability of the VBA code to start the show. However, this method is not necessary, because the slide show by definition is always the foreground object when started.

RESOLUTION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. For more information about how to use the sample code in this article, click the article number below to view the article in the Microsoft Knowledge Base:

173707 OFF97: How to Run Sample Code from Knowledge Base Articles


Use the Visible Property

Instead of using the Activate method to make PowerPoint the foreground object, use the Visible property, for example:

   ...
   Set oPPT = CreateObject("Powerpoint.Application")
   oPPT.Visible = msoTrue
   ...
                

After creating the PowerPoint object, setting its Visible property to msoTrue makes it the foreground object.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was corrected in Microsoft PowerPoint 2000.



Additional query words: vba

Keywords: kbbug kbdtacode kbpending KB264826