VBA for Excel , message pop up at a time specified

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.
2,564 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.
3,459 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Viorel 111.8K 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.

    1 person found this answer helpful.
    0 comments No comments