Microsoft Powerpoint - Check if on last slide of presentation

Asked By Awal Saani on 29-Sep-18 07:52 AM
 I want to check if on last slide of the PowerPoint presentation then exit the loop in the subroutine below.

sub Timer()
Dim Time As Date
Dim Count As Double
Time = Now()
Count = 1800
Time = DateAdd("s", Count, Time)
Do Until Time < Now()

ActivePresentation.SlideMaster.Shapes("lblTimer") _
    .TextFrame.TextRange.Text = Format((Time - Now()), "hh:mm:ss")

Call TimeUp()

End Sub
Robbe Morris replied to Awal Saani on 29-Sep-18 05:33 PM
Have you tried using the Macro recorder to generate your VBA code?  Start the recorder, manually preform the steps you want, stop the recorder and view the code.  You can usually get going in the right direction from there.