Consulting

Results 1 to 2 of 2

Thread: VBA not getting executed in .ppsm file

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Newbie
    Joined
    May 2017
    Posts
    1
    Location

    VBA not getting executed in .ppsm file

    Hello,

    I have following VBA code in powerpoint 2007:

    Sub OnSlideShowPageChange()
    On Error GoTo ErrLog
        Dim i As Integer
        
        If Format(Date, "dd/mm/yyyy") = Format(CDate("21/5/2017")) Then
            'Run the Slide
           msgbox "Running"
        Else
             msgbox "Exiting"
            ActivePresentation.SlideShowWindow.View.Exit
        End If
        Exit Sub
        
    ErrLog:
        MsgBox Err.Description
    End Sub
    i..e I want that this powerpoint .ppsm file run only on 21st May 2017. On other dates, it should exit. I save my pptm file and also saved in .ppsm format. When my pptm file is open, and I run .ppsm file from Windows Explorer, VBA code executes. But if I exit my .pptm file and then run .ppsm file from Windows Explorer, VBA code does not execute. Why?

    Please Help....
    Last edited by Paul_Hossler; 05-24-2017 at 08:19 AM. Reason: Added [CODE] tags

Posting Permissions

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