C
clayton
I just got a UPS for our computer that has the ability to run an
program/batch file/etc that can be executed from the command line whe
the power goes out.
I want to somehow make a batch file or something that will be able t
execute the below code when the power goes out.
This is the same code that is normally executed by the user at the en
of the night by pressing a button.
Code
-------------------
Sub SHUTDOWN_WIN()
If Worksheets.count > 1 Then
unhideall
Call split_worksheet_to_workbook
End If
Application.DisplayAlerts = False
ActiveWorkbook.Save
Call Shell("c:\windows\system32\Shutdown.exe -s -t 0", 1)
ActiveWorkbook.Close
Application.DisplayAlerts = True
End Su
-------------------
This code must somehow be executed from within the workbook itself a
it calls other functions. I don't know if this is possible or not bu
it sure would be handy..
program/batch file/etc that can be executed from the command line whe
the power goes out.
I want to somehow make a batch file or something that will be able t
execute the below code when the power goes out.
This is the same code that is normally executed by the user at the en
of the night by pressing a button.
Code
-------------------
Sub SHUTDOWN_WIN()
If Worksheets.count > 1 Then
unhideall
Call split_worksheet_to_workbook
End If
Application.DisplayAlerts = False
ActiveWorkbook.Save
Call Shell("c:\windows\system32\Shutdown.exe -s -t 0", 1)
ActiveWorkbook.Close
Application.DisplayAlerts = True
End Su
-------------------
This code must somehow be executed from within the workbook itself a
it calls other functions. I don't know if this is possible or not bu
it sure would be handy..