VBA: Send Sub to sleep

If one, like me, has the need for a timer at his desk that notifies when the cup of tea is ready and the teabag should be removed, there is the multipurpose-tool MS Excel-VBA.

This Sub uses the “Sleep”-Function of the “kernel32.dll” in a VBA-Macro.

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Sub TeaTimer()

Dim time As String

time = InputBox("Enter Teatime (Min):")

If time = "" Then
    Exit Sub
End If

time = time * 60 * 1000

Sleep time

MsgBox "Enjoy your tea!", vbInformation

End Sub