Thomas.Uebermeier@stud.uni-bayreuth.de

Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags 

as

Long, ByVal dwReserved

as

Long)

as

Boolean Public Const EWX_FORCE = 4 Public Const EWX_LOGOFF = 0 Public Const EWX_REBOOT = 2 Public Const EWX_SHUTDOWN = 1 ... Dim res

as

Boolean res = ExitWindowsEx (EWX_REBOOT, 0) If Not res Then MsgBox "Function failed" Else MsgBox "Shutting

down

Windows NOW!" End EndIf
Return