在其他帖子的Outlook 2013模块中拼凑此测试程序,其中应显示一个弹出框,然后在3秒后自动关闭.问题是它永远不会关闭.
Sub MessageBoxTimer()
Dim AckTime As Integer, InfoBox As Object
Set InfoBox = CreateObject("WScript.Shell")
AckTime = 3
Select Case InfoBox.Popup("Click OK (this window closes automatically after 3 seconds).", _
AckTime, "This is your Message Box", 0)
Case 1, -1
Exit Sub
End Select
End Sub
Run Code Online (Sandbox Code Playgroud) vba ×1