Case closed.
The answer to this riddle can be found at:
http://www.vbaexpress.com/foru…ot-Hidden-Slides&p=413692
(I now realize I've 'cross-posted' and will refrain from doing so in the future)
Posts by Kellaroo
-
-
Hello all, I'm trying to make my code only randomize non-hidden slides. I know this forum is primarily for Excel, but since there is so much VBA expertise here I was hoping someone could easily identify my problem. 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.
Code
Display MoreThere 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?