Skip to content

Instantly share code, notes, and snippets.

@trajche
Last active October 19, 2015 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trajche/e046fea19114a13696fd to your computer and use it in GitHub Desktop.
Save trajche/e046fea19114a13696fd to your computer and use it in GitHub Desktop.
Progress bar for a Powerpoint in VBA
Sub ProgressBar()
On Error Resume Next
With ActivePresentation
For X = 1 To .Slides.Count
.Slides(X).Shapes("PB").Delete
Set s = .Slides(X).Shapes.AddShape(msoShapeRectangle, _
0, 0, _
X * .PageSetup.SlideWidth / .Slides.Count, 18)
s.Fill.ForeColor.RGB = RGB(63, 153, 209)
s.Line.Visible = 0
s.Name = "PB"
Next X:
End With
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment