powerpoint - 在 Powerpoint 中显示具体的运行时间
问题描述
我几乎在任何地方都尝试过查找这个,但仍然没有运气..
我已经能够在 PowerPoint 中创建一个实时运行的时钟,但是有没有办法让它成为一个特定的时间?前任。我希望时间从下午 2:20:00 开始,尽管那可能不是当前时间并运行?
目前我正在使用
Public clock as Boolean
Public currenttime, currentday as string
Sub Pause()
Dim PauseTime, start
PauseTime = 1
start = Timer
Do While Timer < start + PauseTime
DoEvents
Loop
End Sub
Sub StartClock()
clock = Time
Do Until clock = false
On Error Resume Next
currentime = Format ((Now()), "hh:mm:ss AM/PM")
currentime = Mid(currenttime, 1, Len(currenttime) - 3)
ActivePresentation.Slides(SlideShowWindows(1).View.CurrentShowPosition).Shapes("TimeTest").TextFrame.TextRange.Text = currenttime
Pause
Loop
End Sub
Sub OnSlideShowPageChange(ByVal objWindows As SlideShowWindow)
clock = false
ActivePresentation.Slides(SlideShowWindows(1).View.CurrentShowPosition).Shapes("TimeTest").TextFrame.TextRange.Text = "--:--:--"
End Sub
Sub OnSlideShowTerminate()
clock = false
End Sub
我在我看过的一个 YouTube 视频上发现了这个,它成功地显示了当前时间,但现在我该如何改变它来显示一个特定的时间?
解决方案
这应该这样做:
Currentime = format("2:20 PM","hh:mm:ss AM/PM")
使用它代替现有的两条 Currentime= 行
推荐阅读
- sql - 将字符注入日期列
- facebook - 用于 Facebook Messenger 的 IBM watson 聊天机器人
- android - opencv在变量中获取fps
- jasmine - AfterEach 和 BeforeEach 仅适用于 describe()s
- node.js - 将来自 any() 的 PostgreSQL 响应解析为 JS 对象
- excel - Excel 公式返回最新日期旁边的值
- php - curl_exec() 自动运行 var_dump()
- sql - 删除不重复的行
- flutter - Flutter / Android - 将焦点从 TextField 移动到 DropdownButton
- jquery - 在 HTML 中查找 div 的上下文