TPE

http://bayanbox.ir/view/263405954590585756/2mobile.png

Tavvafi@gmail.com


≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡

Function NextUnhiddenSlide(lStartingSlideIndex As Long) As Long
' Returns the next unhidden slide following the slide at lStartingSlideIndex

    Dim x As Long
    Dim oPres As Presentation

    Set oPres = ActivePresentation
    For x = lStartingSlideIndex + 1 To oPres.Slides.Count
        If Not oPres.Slides(x).SlideShowTransition.Hidden Then
            NextUnhiddenSlide = x
            Exit Function
        End If
    Next

End Function

Sub TestMe()
    Dim x As Long
    Dim y As Long

    For x = 1 To ActivePresentation.Slides.Count
        y = NextUnhiddenSlide(x)
        If y > 0 Then
            Debug.Print "Current slide:" & vbTab & x & vbTab & "Next unhidden:" & vbTab & y
        Else
            Debug.Print "Current slide:" & vbTab & x & vbTab & "Next unhidden:" & vbTab & "NONE"
        End If
    Next

End Sub