Hello all, I'm trying to make my code only randomize non-hidden slides. I'm a noobie to VBA. I've just tried to figure it out logically, but I'm afraid I lack fundamental coding knowledge to solve this problem.
There are 6 slides and the code will randomize them successfully if I leave out the If statement about "SlideShowTransition.Hidden = False" - So therein lies the problem...
Sub RandomVisibleSlides ()
FirstSlide = 1
LastSlide = 6
RSN = SlideIndex
Randomize
'generate random number for Index
GRN:
RSN = Int((LastSlide - FirstSlide + 1) * Rnd + FirstSlide)
If RSN = ActivePresentation.SlideShowWindow.View.Slide.SlideIndex Then
If ActivePresentation.Slides(RSN).SlideShowTransition.Hidden = False Then GoTo GRN
ActivePresentation.SlideShowWindow.View.GotoSlide (RSN)
End Sub
My experiment PowerPoint is attached.
What am I doing wrong?