B
Benjamin
I am trying to get a scrollbar to work during a presentation. I am currently
using this 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
This code is working however it is making direct changes to the slide, so
when the user ends the presentation he/she is asked if they want to save
changes. If they say no then the scrollbar won't work again EVER on that
slide (i don't know why). But what I am trying to do is have the slide
display the same thing ever time someone goes to it and allow them to scroll
a picture and then when they leave the slide have it go back to the way it
was originally. Like having the scrollbar value be zero. And I don't want
them to be prompted with a save dialog box at the end of the show.
This is the first time I have ever used VBA code in PPT so I don't exactly
know what is going on. I think possible solutions may be found in changing
the first line of code "Public WithEvents PPTEvent As Application" It seems
that the As Application may be causing a problem, but like I said I really am
not understanding how this line of code works or what it does, all I know is
that if I don't have this line of code then the events for the scrollbar will
never be run. Anyone have any advice on what to do?
using this 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
This code is working however it is making direct changes to the slide, so
when the user ends the presentation he/she is asked if they want to save
changes. If they say no then the scrollbar won't work again EVER on that
slide (i don't know why). But what I am trying to do is have the slide
display the same thing ever time someone goes to it and allow them to scroll
a picture and then when they leave the slide have it go back to the way it
was originally. Like having the scrollbar value be zero. And I don't want
them to be prompted with a save dialog box at the end of the show.
This is the first time I have ever used VBA code in PPT so I don't exactly
know what is going on. I think possible solutions may be found in changing
the first line of code "Public WithEvents PPTEvent As Application" It seems
that the As Application may be causing a problem, but like I said I really am
not understanding how this line of code works or what it does, all I know is
that if I don't have this line of code then the events for the scrollbar will
never be run. Anyone have any advice on what to do?