VBA for Excel , message pop up at a time specified

asked 2021-11-24T14:06:27.02+00:00
Alex Keraut 6 Reputation points


Users are working with macros-enables Excel workbook.

Is there an opportunity to generate a VBA message at a specified time?
Example : Excel message pops up at 10pm CET and says "Please stop working and go home".


An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
1,825 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
1,934 questions
No comments
1 vote

1 answer

Sort by: Most helpful
  1. answered 2021-11-24T15:18:53.987+00:00
    Viorel 82,371 Reputation points

    Try executing a code like this:

    Application.OnTime "22:00", "MyProcedure"

    Also add a module containing this procedure:

    Public Sub MyProcedure()
        MsgBox "Please stop working and go home"
    End Sub

    Probably the OnTime function can be called automatically from the Open event of workbook.

    No comments