Display popup for a time period in Excel

前端 未结 5 1276
萌比男神i
萌比男神i 2021-01-23 17:41

I am trying to generate a popup that closes after a given WaitTime in seconds.

I consulted this link and this link.

I tried to apply the method from

5条回答
  •  情歌与酒
    2021-01-23 18:24

    The following code works for me:

    Sub TimeBasedPopUp()
    
    Dim WaitTime As Integer
    
    WaitTime = 1
    Select Case CreateObject("WScript.Shell").Popup("The message box will close in 1 second.",_
    WaitTime, "MS Excel")
    Case 1, -1
    

    End Select

    End Sub

提交回复
热议问题