Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

Progress Bar In Powerpoint Vb

Recommended Posts

Hello all,
I have a question that I need your help with since I am still really noob in VB. I am trying to create a VB code for powerpoint that will give me progress bar that will tell me how far I am in the slides. I searched the web to see if there this an existting code and I found the following (modified a little):


Code:


Sub AddProgressBars()    Dim X As Long    Dim dblLeft As Double    Dim dblTop As Double    Dim dblheight As Double    Dim oSh As Shape    ' This determines how far in from left the progress bar will start:    dblLeft = 0    ' This determines how high (in points) the progress bar will be:    dblheight = 12    ' This puts the progress bar right against the bottom of the slide, no matter what its height    dblTop = 35    For X = 1 To ActivePresentation.Slides.Count        ' Add a rectangle - it'll be formatted however you have your default object formatting set        Set oSh = ActivePresentation.Slides(X).Shapes.AddShape(msoShapeRectangle, _            dblLeft, _            dblTop, _            (X * ActivePresentation.PageSetup.SlideWidth) / ActivePresentation.Slides.Count, _            dblheight)        With oSh            ' Change this to any color you like, if you like            .Fill.ForeColor.RGB = RGB(192, 165, 229)            ' Don't change this:            .Name = "ThermometerBar"        End With    Next XEnd Sub

Now this code simply draws a wider rectangle everytime I progress in slides. What I am looking for is to have a bordar around each rectangle (like having a # of rectanglualrsegmants correspoding to the # of slides). SO I was wondering how can I intoroduce a boarder to this or of there is another code/solution u saw, I will really appriciate it. Thanks alot for your help in advance and sorry for the long email.

Share this post


Link to post
Share on other sites

Hmm. After reviewing the code and your idea, I could just suggest making each "bar" its own. If the bar just gets wider, then it's impossible to create multiple borders dividing it. Why not just create a bunch of separate ones to cover it up? It is more work, but I believe it's the only way.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.