Hello
I have this code to restart a computer:
***********************************
Sub TurnOffPC()
Dim Action As Long
Application.DisplayAlerts = False
Action = ExitWindowsEx(EWX_SHUTDOWN, 0&)
Application.Quit
End Sub
***********************************
How do I assign it to a command button?