Program controlled Power off

F

Francesco

Is it possible from a VBA program to automatically shut down the computer at
the end of program execution?

Thanks

Francesco
 
S

Stefan Hoffmann

hi Franceso,
Is it possible from a VBA program to automatically shut down the computer at
the end of program execution?
Use Shell and the SHUTDOWN commandline tools.


mfG
--> stefan <--
 
S

Stefan Hoffmann

hi Franceso,
Is it possible from a VBA program to automatically shut down the
computer at the end of program execution?
Use Shell and the SHUTDOWN commandline tools.

Public Sub ShutDown()

On Local Error GoTo LocalError

Shell "SHUTDOWN -s"

End Sub


mfG
--> stefan <--
 
F

Francesco

Thanks, it works!

Stefan Hoffmann said:
hi Franceso,

Use Shell and the SHUTDOWN commandline tools.

Public Sub ShutDown()

On Local Error GoTo LocalError

Shell "SHUTDOWN -s"

End Sub


mfG
--> stefan <--
 
Top