VBA MAC PowerPoint KeyEvent

问题描述

我有一个适用于 Windows 的 PowerPoint 宏:

Public Declare PtrSafe Function GetAsyncKeystate Lib "user32" (ByVal vKey As Long) As Integer

If GetAsyncKeystate(VK_ENTER) < 0 Then msgBox "Enter pressed!"

当我在 Mac 上运行时,出现错误:“找不到用户 32 的文件

显然这与 Mac 上没有 Windows 库有关?

如何确定是否使用 Mac VBA for PowerPoint 按下了 [enter]。有等价物吗?我找了很多,都没有找到...

解决方法

我在 Ron 的网站上找到了答案:https://www.macexcel.com/examples/setupinfo/detectkeypress/