简体   繁体   English

如何通过更改幻灯片在 PowerPoint VBA 中重新启动宏

[英]How to restart macro in PowerPoint VBA by changing slides

I am creating a timer in PowerPoint VBA and I would like it to restart when the user presses back on the remote control.我正在 PowerPoint VBA 中创建一个计时器,我希望它在用户按下遥控器时重新启动。 For this, I used this sub:为此,我使用了这个子:

Private Sub PPTEvent_SlideShowBegin(ByVal Wn As SlideShowWindow)
    Call Tmr
End Sub

But nothing happens when I press back (or left arrow key).但是当我按回(或左箭头键)时没有任何反应。 I would also like the macro to start when I open the PowerPoint document and I thought that would have been done by a Sub Auto_Open() command, placed in a module.我还希望宏在我打开 PowerPoint 文档时启动,我认为这可以通过放置在模块中的Sub Auto_Open()命令来完成。 Nope.不。

I would be crazy happy for a tiny bit of help!我会很高兴能得到一点点帮助!

I am not sure which verion you are using.我不确定您使用的是哪个版本。 You might like to try one of these events , OnSlideShowPageChange for example.您可能想尝试one of these events OnSlideShowPageChange ,例如OnSlideShowPageChange

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM