Hi Bernd
This will put a messagebox on top of whatever application you are using
(whith possible exceptions of other modal forms,messages or system dialogs).
Note that it's quite a nasty trick (about as annoying as Outlook's default
"You have mail" prompt) but I'm sure you will use this with care. Try the
Test macro, you will then have 8 seconds to switch to whatever app before
the messagebox shows up.
'********************************************
Option Explicit 'top of standard module
Declare Function GetForegroundWindow Lib _
"user32.dll" () As Long
Public Declare Function MessageBox Lib _
"user32" Alias "MessageBoxA" (ByVal _
hwnd As Long, ByVal lpText As String, _
ByVal lpCaption As String, _
ByVal wType As Long) As Long
Sub MsgMe()
Dim x As Long
Dim y As Long
x = GetForegroundWindow
y = MessageBox(x, "My message", "Hi there", 65536)
End Sub
Sub test()
Application.OnTime _
(Now + TimeSerial(0, 0, 8)), "MsgMe"
End Sub