Point:ExcelからWindowsを終了・再起動させたい。 'APIの宣言
Public Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long,
ByVal dwReserved As Long) As Long
Public Const EWX_SHUTDOWN = 1
Public Const EWX_REBOOT = 2
'Windowsの終了
Sub Test()
Call ExitWindowsEx(EWX_SHUTDOWN, 0)
End Sub
'再起動
Sub Test2()
Call ExitWindowsEx(EWX_REBOOT, 0)
End Sub
|