Question about vba in PPT(Microsoft PowerPoint )
I want display a progress bar when showing ppt. I write code like this:
Public WithEvents App As Application
Private Sub App_SlideShowNextSlide(ByVal Wn As SlideShowWindow)
Dim Showpos As Integer
Showpos = Wn.View.CurrentShowPosition
Dim PageCount As Integer
PageCount = Application.ActivePresentation.Slides.Count
SlideShowWindows(Index:=1).View.PointerType = ppSlideShowPointerPen
Dim i As Integer
For i = 1 To 15
Wn.View.DrawLine 0, i, 700 * Showpos / PageCount, i
Next
End Sub
using abov开发者_运维问答e code, a progress bar appear when I show the PPT. But when I turn to next slide,The progress bar appear and disappear quickly.I wonder why it happens.And how to prevent the progress bar disappearing.Thanks
It's kind of ugly, but you could turn off the screen updating in between slides: http://skp.mvps.org/ppt00033.htm
精彩评论