Need help with scroll bar activex control to scroll stack of image

G

Guest

To whom it may concern:

Here is what I want to do. I have a stack of images on one slide of a ppt
presentation all centered on top of each other. I have a custom animation
setup to start on click with each image and thus, when running the slide
show, it appears the images are changing, one on top of the other to scroll
through the stack of images on the one slide.

Now, I want to add a scroll bar activex control to the same slide that
changes the images. In essence, the same as clicking the arrow on the
keyboard or rolling the wheel on the mouse to move the through the stack of
images on the slide. Is this possible? Can someone give me some sample code?

Thanks
 
S

Shyam Pillai

Since you have already set up the images and the animtation, it would easy
to scroll thru the shapes using SlideShowWindows(1).View.Next and move back
up using SlideShowWindows(1).View.Previous.


--
Regards,
Shyam Pillai

Animation Carbon: Copy/Paste/Share animation libraries.
www.animationcarbon.com
 
G

Guest

Thanks! However, my VB skills are nill. How do you assign this to the scroll
bar to move forward and backward? Also, I would like the scroll bar to move
to the end without exiting the animation completely so that I don't move on
to the next slide.
 
G

Guest

Sorry, one more thing to ask!

Let's say we have 20 images. How do I set the scrollbar max to the number of
animations, in this case 20.
 
G

Guest

Somebody at work tried something that does not seem to be working reliably.
This is what it looks like:

Public previous As Integer

Private Sub ScrollBar1_Change()

End Sub

Private Sub ScrollBar1_GotFocus()
'ScrollBar1.Value = 1
previous = ScrollBar1.Value
ScrollBar1.Max = ActivePresentation.Slides(1).TimeLine.MainSequence.Count
End Sub

Private Sub ScrollBar1_LostFocus()

End Sub

Private Sub ScrollBar1_scroll()

If previous > ScrollBar1.Value Then
SlideShowWindows(1).View.previous
Else
SlideShowWindows(1).View.Next
End If

End Sub
 
G

Guest

Sorry again! But, how do you select the nth animation in an animation list?
We were trying something like:

ActivePresentation.Slides(Me.SlideNumber).TimeLine.MainSequence.Item(ScrollBar1.Value).MoveBefore.....????????????
 
S

Shyam Pillai

There are two ways to approach this:
a) since you already know how many animations are present, you can set the
scrollbar max property to this one.
b) trap the SlideShowNextClick event to ascertain the next animation that
will be fired.


--
Regards,
Shyam Pillai

Animation Carbon: Copy/Paste/Share animation libraries.
www.animationcarbon.com
 
G

Guest

Thanks Shyam. Things are getting close but I don't know how to "trap" and
event. Here is the latest code. We are grabbing the max number from the
number of timeline counts. The issues now are that:
1) It does not scroll right away. I have to grab the scroll bar, pull it all
the way to the right and then it seems to scroll. I don't know why it won't
scroll right away. We thought GotFocus would help.
2) It intermittently exits. It seems to lose where it is located or something.

Can you examine the code we have now and make any changes you think would
work? Your help is greatly appreciated.

Private Sub ScrollBar1_GotFocus()
ScrollBar1.Min = 1
ScrollBar1.Max =
ActivePresentation.Slides(Me.SlideNumber).TimeLine.MainSequence.Count
ScrollBar1.Value = 1
End Sub


Private Sub ScrollBar1_scroll()


Static LastValue As Integer
Select Case ScrollBar1.Value
Case Is > LastValue
SlideShowWindows(1).View.previous
Case Is < LastValue
SlideShowWindows(1).View.Next
End Select

LastValue = ScrollBar1.Value

End Sub
 
G

Guest

Thanks Shyam. Things are getting close but I don't know how to "trap" an
event. If I have a slide after the stacked image slide it exits then
animation right to the next slide. Here is the latest code. We are grabbing
the max number from the
number of timeline counts. The issues now are that:

1) It does not scroll right away. I have to grab the scroll bar, pull it all
the way to the right and then it seems to scroll. It shows a lot of blank
white images as well which I don't know why and like I said it will not
scroll right away. We thought GotFocus would help.
2) It intermittently exits. It seems to lose where it is located or something.

Can you examine the code we have now and make any changes you think would
work? Your help is greatly appreciated.

Private Sub ScrollBar1_GotFocus()
ScrollBar1.Min = 1
ScrollBar1.Max =
ActivePresentation.Slides(Me.SlideNumber).TimeLine.MainSequence.Count
ScrollBar1.Value = 1
End Sub


Private Sub ScrollBar1_scroll()


Static LastValue As Integer
Select Case ScrollBar1.Value
Case Is > LastValue
SlideShowWindows(1).View.previous
Case Is < LastValue
SlideShowWindows(1).View.Next
End Select

LastValue = ScrollBar1.Value

End Sub
 
G

Guest

I am trying to refresh this thread as I have not solved this problem. Can
anyone help with this?
 

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