Program controlled Power off

  • Thread starter Thread starter Francesco
  • Start date Start date
F

Francesco

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

Thanks

Francesco
 
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 <--
 
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 <--
 
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 <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top