【问题标题】:Is there an “Application.Wait” method是否有“Application.Wait”方法
【发布时间】:2019-11-22 14:48:51
【问题描述】:

我正在尝试在 VBA 中创建一个宏,将 PowerPoint 文本对象中的所有文本从英语翻译为西班牙语,我找到了一种在 excel 中执行此操作的方法,但它使用仅适用于 excel 的 Application.wait 方法, 还有其他方法可以暂停 PowerPoint 程序吗?我以前从未使用过 VBA,如果这是一个愚蠢的问题,我很抱歉。

【问题讨论】:

  • Application.Wait 有什么用?
  • 我认为是因为在谷歌翻译页面中进行咨询需要时间,但我不确定

标签: vba powerpoint


【解决方案1】:

如果你不能让Application.Wait 工作,你应该可以使用它来代替

Sub AppWait()
  Dim WAIT As Double
  WAIT = Timer
  While Timer < WAIT + 2 ' 2 seconds
    DoEvents  'do nothing
  Wend
End Sub

【讨论】:

  • 感谢它的工作,但无法使用 PowerPoint 使用脚本的其他功能
猜你喜欢
  • 1970-01-01
  • 2014-02-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-11-19
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多