View Single Post
 
Old 07-08-2013, 11:33 PM
JohnWilson JohnWilson is offline Windows 7 64bit Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,913
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

This not a method I would normally suggest as it can be unreliable. However in you specific case it should be fine. Just be aware it may not work in other situations.

It will reset checkboxes when the show ends (not if you have a goto start button though the show must close)

Sub OnSlideShowTerminate(Wn As SlideShowWindow)
Dim opres As Presentation
Dim osld As Slide
Dim oshp As Shape
Set opres = Wn.Parent
For Each osld In opres.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoOLEControlObject Then
Debug.Print oshp.OLEFormat.ProgID
If oshp.OLEFormat.ProgID = "Forms.CheckBox.1" Then
oshp.OLEFormat.Object.Value = False
End If
End If
Next oshp
Next osld
End Sub

If you want the checks clearded at the last slide whether the show closes or not this can also be done buy you would need to be sure that you had collected any results before the boxes update!

Sub OnSlideShowPageChange(Wn As SlideShowWindow)
Dim opres As Presentation
Dim osld As Slide
Dim oshp As Shape
Set opres = Wn.Parent
If Wn.View.Slide.SlideIndex = opres.Slides.Count Then
For Each osld In opres.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoOLEControlObject Then
Debug.Print oshp.OLEFormat.ProgID
If oshp.OLEFormat.ProgID = "Forms.CheckBox.1" Then
oshp.OLEFormat.Object.Value = False
End If
End If
Next oshp
Next osld
End If
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials

Last edited by JohnWilson; 07-09-2013 at 05:34 AM.
Reply With Quote