简体   繁体   中英

Showing notification popup in excel

有没有一种方法可以通过VBA或其他方式在Excel中每5分钟向用户显示一个通知弹出窗口?我要做的就是每5分钟自动向用户显示一条消息(提醒)以保存其作品。

Use this:

Sub my_Procedure()
    MsgBox "Save your workbook!"
    Call test ' for starting timer again
End Sub

Sub test()
    Application.OnTime Now + TimeValue("00:05:00"), "my_Procedure"
End Sub

To automate this macro, put this code into ThisWorkbook:

Private Sub Workbook_Open()
   Call my_Procedure
End Sub

Instructions here

!!! Be careful about automatization, just put some if condition to run popup code, otherwise this code may run decpite you close shared workbook.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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