jordanburch
Active Member
- Joined
- Jun 10, 2016
- Messages
- 443
- Office Version
- 2016
Hi I'm looking for a script that will prevent my laptop from sleeping and keep teams active. I also need instructions on how to install. Can anyone help me please?
I think you can simply go to settings on your PC (Not Excel) and set your PC to Never instead of a timeHi I'm looking for a script that will prevent my laptop from sleeping and keep teams active. I also need instructions on how to install. Can anyone help me please?
Private NextTime As Date
Sub KeepAlive()
ActiveSheet.Range("A1").Select
Application.Wait DateAdd("s", 1, Now)
NextTime = DateAdd("s", 30, Now)
SendKeys ("{enter}")
Application.OnTime NextTime, "KeepAlive"
End Sub
Sub StopKeepAlive()
On Error Resume Next
Application.OnTime NextTime, "KeepAlive", , False
End Sub
awesome thanksI typically use something like this to keep the presence indicator active and the computer awake. Paste this into a module.
VBA Code:Private NextTime As Date Sub KeepAlive() ActiveSheet.Range("A1").Select Application.Wait DateAdd("s", 1, Now) NextTime = DateAdd("s", 30, Now) SendKeys ("{enter}") Application.OnTime NextTime, "KeepAlive" End Sub Sub StopKeepAlive() On Error Resume Next Application.OnTime NextTime, "KeepAlive", , False End Sub
Run 'KeepAlive' to start it. Important: after running the script, select a cell in your worksheet. Any cell will be fine.
To stop it, run 'StopKeepAlive'.
does it keep you active even if you log out but keep laptop on?Use a powerpoint slide show which is never ending.