Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is something you can try out...
I found this snippet @ http://www.experts-exchange.com/Prog..._23186029.html Run the first one before your code starts and the second one after your code completes. Just set the times you want them to be set back to in the "turn_on" procedure in minutes. Omit the hibernate mode if you do not need it. Mark Ivey Sub turn_off_standby_and_hybernation_modes() ''' Before starting your code Dim objShell Set objShell = CreateObject("WScript.Shell") objShell.Run "cmd /c powercfg /change ""Always On"" /standby-timeout-ac 0", 0, True objShell.Run "cmd /c powercfg /change ""Always On"" /hibernate-timeout-ac 0", 0, True objShell.Run "cmd /c powercfg /setactive ""Always On""", 0, True Set objShell = Nothing End Sub Sub turn_on_standby_and_hybernation_modes() ''' After starting your code ''' Set the appropriate times in minutes below Dim objShell Set objShell = CreateObject("WScript.Shell") objShell.Run "cmd /c powercfg /change ""Always On"" /standby-timeout-ac 30", 0, True objShell.Run "cmd /c powercfg /change ""Always On"" /hibernate-timeout-ac 60", 0, True objShell.Run "cmd /c powercfg /setactive ""Always On""", 0, True Set objShell = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003: How to nudge a chart element or shape on a chart? | Charts and Charting in Excel | |||
nudge | Charts and Charting in Excel | |||
Nudge graphics down and right | Excel Programming | |||
Nudge entry just a hair | Excel Discussion (Misc queries) | |||
Nudge in XP | Excel Discussion (Misc queries) |