Results 1 to 3 of 3

Thread: Unhide slides by date

  1. #1

    Unhide slides by date

    I am trying to make an advent calendar for my students. I have a main page with a makro. They can only access the slides on certain dates. But now I realize they can still use the space bar or keys to access all slides. My solution would be to hide all slides and make them visible one by one by their respective dates.
    I got a vba off the internet but as I am super inexperienced it does not work. Please, anyone got a solution? Do I have to use a different modul? Or can I add it to the first modul? Is there an easier way? Also the kids are using iPads. Does that change anything?

    This is what's not working:

    Sub hideslide()
    Dim x As Integer
    Dim d1 As Date
    Dim d2 As Date
    x = 1
    d1 = Date
    d2 = "11/20/2012"
    On Error GoTo errhandler
    If d1 < d2 Then
    ActivePresentation.Slides(x).SlideShowTransition.Hidden = msoTrue
    ActivePresentation.Slides(x).SlideShowTransition.Hidden = msoFalse
    End If
    End Sub
    Last edited by Aussiebear; 11-28-2022 at 11:58 AM. Reason: Added code tags to supplied code

  2. #2
    VBAX Expert
    Mar 2008
    Kent, England
    I don't think there is any support for VBA on PowerPoint for IPad, same with Excel etc...
    If things don't change they stay the same
    Quite often there is a picnic problem (problem in chair not in computer)
    "We were not told it was impossible, so we did it."

  3. #3
    VBAX Regular
    May 2018
    Try this:

    Sub ShowSlidesOnSpecificDates()    
    Dim i As Integer
    Dim d1 As Date
    Dim d2 As Date
    d1 = Date
    For i = 1 To ActivePresentation.Slides.Count
    d2 = "11/20/2012" ' Replace this with the date you want to show the slide
        If d1 = d2 Then
           ActivePresentation.Slides(i).SlideShowTransition.Hidden = msoFalse
           ActivePresentation.Slides(i).SlideShowTransition.Hidden = msoTrue
        End If
    Next i
    End Sub

    This code should show the slide on the specified date and hide all other slides. You can modify the code to use different dates for each slide if you want.
    If you only ever do what you can , you'll only ever be what you are.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts