Power point Progress Bar

This code will help you to add a progress bar to your power point.

This can be useful for:

  • Controlling your presentation time.
  • Keeping the attention of your audience.

VBA Code:

Sub AddProgressBar()
On Error Resume Next

Dim slide As slide
Dim X As Integer, Y As Integer, Z As Integer
X = 0 'total unhidden slides
Y = 0 'Unhidden so far
Z = 0 'Total

' Loop through all slides in the presentation to count slides and delete previous bars
For Each slide In ActivePresentation.Slides
ActivePresentation.Slides(X + 1).Shapes("HMB").Delete
If slide.SlideShowTransition.Hidden = False Then
X = X + 1
End If
Next slide

' Loop through all slides in the presentation to add the bars based on required width
For Each slide In ActivePresentation.Slides
Z = Z + 1
ActivePresentation.Slides(Z).Shapes("HMB").Delete
If slide.SlideShowTransition.Hidden = False Then
' Increment the counter if the slide is not hidden
Y = Y + 1
Set HMBs = ActivePresentation.Slides(Z).Shapes.AddShape(msoShapeRectangle, 0, ActivePresentation.PageSetup.SlideHeight - 32, ActivePresentation.PageSetup.SlideWidth * Y / X, 15)
'HMBs.Fill.ForeColor.RGB = RGB(255, 255, 255) 'white bar
'HMBs.Fill.ForeColor.RGB = RGB(255, 0, 0) 'red bar
HMBs.Fill.ForeColor.RGB = RGB(0, 255, 0) 'red bar
HMBs.Name = "HMB"
End If
Next slide
End Sub

Thank you!

 

 

About the author: Hassan ElBanhawi

4 comments to “Power point Progress Bar”

You can leave a reply or Trackback this post.

  1. Kim Jin tae - December 12, 2024 at 12:58 pm Reply

    1,

  2. Güzeltepe su kaçak tespiti - March 24, 2025 at 8:14 am Reply

    Güzeltepe su kaçak tespiti Küçükçekmece su kaçağı tespiti: Küçükçekmece’deki su kaçakları için garantili hizmet. https://www.provolutions.com/?p=4441

  3. Bağlarçeşme su kaçak tespiti - March 27, 2025 at 1:57 pm Reply

    Bağlarçeşme su kaçak tespiti Evde Güvende Hissettik: Çalışanlar oldukça güven vericiydi. Evde rahatlıkla çalıştılar. http://www.ibella.co/uskudar-tesisatci-kacak-tespiti/

Leave a Reply