Acessing Powerpoint status bar via VBA

P

Pranav Vaidya

Hi,

I am trying to access the Powerpoint statusbar in my VBA code.
I know in Word there is something like Application.StatusBar.

I do not find the same in Powerpoint. I just want to show some message on
the Status bar.

Is this possible? How?

Thanks in advance.
 
B

Brian Reilly, MVP

You can fake a Application.StatusBar by using a text box. The
following code works in SlideShow view but does have hardcode textbox
name and it is set to work on Slide 1.

Sub fake_status_bar()
'By Brian Reilly, MVP
'Purpose, to show and then populate a text box and hide it when
finished.
'This works in SlideShow View and is only tested in PPT 2003
Dim lCounter As Long
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'I added a textbox in Edit View but you could also add it when this
code is called
' and then position it
'Text Box was the name PowerPoint assigned it for me.

ActivePresentation.Slides(1).Shapes("Text Box 17").Visible = True
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
With ActivePresentation.Slides(1).Shapes("Text Box
17").TextFrame.TextRange
For lCounter = 1 To 100
'You must use GotoSlide to refresh the screen
SlideShowWindows(1).View.GotoSlide 1
.Text = "Counting to " & lCounter
Next lCounter
End With
ActivePresentation.Slides(1).Shapes("Text Box 17").Visible = False
End Sub

To accomplish this in Edit View you'd probably have to use an API call
using Sleep. Shyam Pillai's web site has a good example of the Sleep
API call. I've modified his code and used it in Edit mode for a
completely different reason.

Brian Reilly, MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top