I have a multi-slide presentation. Users are to go through and tick the checkbox control, for any slides they wish to "keep". I'd like to run a macro to then delete any slide that ISN'T checked. I feel like this code should work, but it's giving me weird results. It deletes slides, but randomly and only if I run it over and over. I'm aware that the checkbox is only "interactive" while in slideshow mode...that also appears to be the case for running macros that interact with checkboxes.

Sub DeleteSlides()

Dim sldTemp As Slide
Dim shpTemp As Shape


For Each sldTemp In ActivePresentation.Slides
For Each shpTemp In sldTemp.Shapes
If shpTemp.Type = msoOLEControlObject Then
If TypeName(shpTemp.OLEFormat.Object) = "CheckBox1" Then
    If shpTemp.OLEFormat.Object.Value = False Then
        sldTemp.Delete
End If
End If
End If
Next
Next


End Sub