Private Declare Function ExitWindowsEx Lib "user32" Alias "ExitWindowsEx" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Const EWX_REBOOT = 2

Private Sub Command1_Click()
ExitWindowsEx EWX_REBOOT, 0
End Sub