scrollbar object doesn't run vba code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a scrollbar on a slide that I added as an object from the control
toolbox. I have got all the properties set and added vba code to the on
change event and when I went to run it it didn't work. I then added a
breakpoint to the event to walk through the code, I then found that it was
never even going to the event so I set up a couple more events like got
focus, scroll and set breakpoints for them also. The problem is that it
never runs any of this code. I have never used vba code in powerpoint before
but it seems like it was set up to use it. Does anyone know what I am doing
wrong, I am thinking it is probably just some small detail that I am
overlooking. Isn't that what it always is though! Thanks for any help.
 
one problem solved one to go. the events were not being run because "Public
WithEvents PPTEvent As Application" was not the first line in the code. Now
my problem is that the scrollbar moves the picture up like it is supposed to
but it is keeping a copy where it first was positioned. I think I just need
to find a way to refresh the slide. Anyone have any ideas?
 
Excellent, I've got it working the way I wanted it. Here is my code:

Public WithEvents PPTEvent As Application

Private Sub Scroll_Change()
image.Top = (Scroll.Value * -1)
'refreshes slide
Dim lSlideIndex As Long
lSlideIndex = SlideShowWindows(1).View.CurrentShowPosition
SlideShowWindows(1).View.GotoSlide lSlideIndex
End Sub

hope someone else finds use for this someday.
 
Back
Top