Consulting

Results 1 to 15 of 15

Thread: Slide shown only between certain hours

  1. #1

    Slide shown only between certain hours

    Hi, Does anyone know if it is possible to only show a slide in a presentation between certain hours of the day?

    I want to be able to have a presentation with say 10 slides, of which 1 will only show between the hours of 7 and 11am.

    These would be running on a continuous loop on a plasma screen.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    It's definitely possible but you will need to be able to code fairly well.

    You'll need to write an add in ideally, with an event handler to fire code on next slide event.

    The code would need to use select case on Left$(Time$,2) to check the time and hide / unhide the slide in question.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    I've not coded in Powerpoint, only in Word and Excel. Can you provide me with a start or any good samples to get me going?

    Thanks, Mark

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    There's a start on events in PowerPoint here
    http://vbaexpress.com/kb/getarticle.php?kb_id=327

    You would probably want to use the SlideShowNextSlide event to trigger code like this

    [vba]Sub checktime()
    Select Case Left$(Time$, 2)
    Case 7 - 10
    ActivePresentation.Slides(xx).SlideShowTransition.Hidden = False
    Case Else
    ActivePresentation.Slides(xx).SlideShowTransition.Hidden = True
    End Select
    End Sub[/vba]
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    thanks, I will take a look at these.

  6. #6
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Should be
    [vba]Val(Left$(Time$, 2))[/vba]
    BTW
    Last edited by John Wilson; 05-14-2008 at 09:27 AM.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  7. #7
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Sorry double post
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  8. #8
    I can get your code to hide a slide working.

    But I can not get the class events module to work, either as per the example you gave the link for or to NextSlide event.

    This is my Class Module called cEventClass:

    [vba] '#######################################################
    '### EventClass code
    '#######################################################
    'declares a variable that will handle application events
    Public WithEvents PPTEvent As Application

    Private Sub PPTEvent_SlideShowNextSlide(ByVal Wn As SlideShowWindow)
    MsgBox "Next Slide"

    End Sub
    [/vba]

    This is my code in a normal Module:

    [vba] '#######################################################

    '#######################################################
    '### Standard module code
    '#######################################################
    'declare an object that will create a new instance of the event class
    Public cPPTObject As New cEventClass

    Sub Auto_Open()

    Set cPPTObject.PPTEvent = Application
    MsgBox "Auto Open"

    End Sub
    [/vba]

    Once I save this as an add-in I do get the MsgBox for saying "Auto Open" but not the one in my class for "Next Slide" when I view the Slide Show.

    ps I'm using Powerpoint 2000
    Last edited by markh1182; 05-15-2008 at 03:04 AM.

  9. #9
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Hi

    Your code works for me. What version do you have?
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  10. #10
    I'm using Powerpoint 2000

  11. #11
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    I'll check out your code in 2000 and get back. I'm pretty sure that the SlideShowNextSlide event is supported though.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  12. #12
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Worked fine in 2000 as well! Maybe you could mail me your ppa file. You'll find my email on the contact pages of PowerPoint Alchemy
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  13. #13
    Hi John, I have emailed you my ppa file and the original ppt file.

    Thanks, Mark

  14. #14
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Thanks I got it

    Unfortunately it works fine here too in all versions I have 2000-2007. The next slide message fires every time.

    Don't know what else to suggest except try a different PC / version

    John
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  15. #15
    thanks for your help John.

Posting Permissions

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