Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-08-2017, 10:22 AM
PPTwhisperer PPTwhisperer is offline Delay calculation in PPT 2016 Windows 10 Delay calculation in PPT 2016 Office 2016
Novice
Delay calculation in PPT 2016
 
Join Date: May 2017
Posts: 2
PPTwhisperer is on a distinguished road
Default Delay calculation in PPT 2016

Hi guys,

after having spent almost 4 nights without getting hardly one single step forward, I finally had to admit that I would have to reach out to the pros.

What I want to do is the following:
  • On the first slide of the presentation is a textbox called StartingTime where I want to enter the scheduled starting time of the presentation.
  • The presentation is structured into several sections of which each starts with a chapter title slide. These chapter title slides are instantiated of a commun slide master called ChapterTitle that contains a placeholder for the title and a textbox called ChapterDuration where I want to enter the scheduled duration for the respective section.
  • Furthermore, the slide master ChapterTitle” should contain two more textboxes OverallTime and Delay. OverallTime should add up the scheduled ChapterDurations of the previous chapters, whereas Delay should indicate how I am doing timewise with my presentation, i.e. the number of minutes I am behind or ahead schedule, i.e. the difference between the current time and the StartingTime + OverallTime.

Let’s have an example.
  1. Section 1 starts at slide 3 and is scheduled to last 5 minutes (which is entered in the textbox ChapterDuration on slide 3
  2. Section 2 starts at slide 8 and is scheduled to last 10 minutes (which is entered in the textbox ChapterDuration on slide 8
  3. Section 3 starts at slide 17 and is scheduled to last 20 minutes (which is entered in the textbox ChapterDuration on slide 17



Assuming that my presentation is scheduled to start at 09:00 (StartingTime = 09:00) and that it starts on time and the first two sections took as scheduled 15 minutes together, then the textboxes on slide 17 when starting section 3 should indicate: OverallTime = 15 minutes and Delay = 0 (Current time – (StartingTime + ChapterDuration[seciton1] + ChapterDuration[section2])

However, if the presentation actually started at 09:04 and the first section took say 3 minutes longer, than scheduled, the textbox Delay on slide 17 should display 7 minutes because the current time is now 09:22 and 09:22 – (09:00 + 5 minutes + 10 minutes) = 7 minutes.

The three major problems I encounter are:
  1. ActiveX textboxes put on slide masters seem not to work.
  2. How can I address the ChapterDuration textboxes on the previous ChapterTitle slides?
  3. How can I automatically execute the macro that calculates the delay whenever I reach a ChapterTitle slide?

Thanks for your appreciated help.

Michael
Reply With Quote
  #2  
Old 05-10-2017, 08:16 AM
JohnWilson JohnWilson is offline Delay calculation in PPT 2016 Windows 7 64bit Delay calculation in PPT 2016 Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

I know you understand exactly what you mean but it really isn't that clear

But

Why do you think ActivX TextBoxes on the master do not work - they do.

You could try this to run a mcro at slide xx

Code:
Sub OnSlideShowPageChange(SW As SlideShowWindow)
If SW.View.CurrentShowPosition = xx Then 'the slide in question
Call themacro
End If
End Sub
You can address an ActivX textbox called "TextBox1" on slide 3 like this

strText=ActivePresentation.Slides(3).Shapes("TextB ox1").OLEFormat.Object.Text

If you measure the value od NOW at two points in the presentation you can use DateDiff to get the elapsed time

Code:
 Public d_then As Date

Sub getEarlier()
d_then = Now
End Sub

Sub getElapsed()
MsgBox DateDiff("s", d_then, Now) & _
" seconds have elapsed.", vbInformation
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials

Last edited by JohnWilson; 05-11-2017 at 08:49 AM.
Reply With Quote
  #3  
Old 05-11-2017, 10:23 AM
PPTwhisperer PPTwhisperer is offline Delay calculation in PPT 2016 Windows 10 Delay calculation in PPT 2016 Office 2016
Novice
Delay calculation in PPT 2016
 
Join Date: May 2017
Posts: 2
PPTwhisperer is on a distinguished road
Default

Thanks JohnWilson

Now, that I've spent 3 nights digging a little deeper into the object model of VBA and thanks to your help, it starts working...

I'm completely new to VBA and it just feels so different to what I did till now.

If you see a guy on CNN who caused a huge explosion coding in VBA, that's me...

Thanks again and have a great day,

Michael
Reply With Quote
Reply

Tags
calculation, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending e-mail with delay paik1002 Outlook 1 02-29-2016 11:27 AM
Auto run macro with delay bremen22 Excel Programming 0 02-04-2016 06:53 AM
Delay calculation in PPT 2016 Delay Analysis ketanco Project 3 03-15-2013 01:06 PM
Delay calculation in PPT 2016 Using the Delay fields Foxfire Mail Merge 5 08-20-2011 02:40 AM
Delay calculation in PPT 2016 Delay delivery Registrar Outlook 1 07-01-2010 10:17 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:14 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft