Stop computer from locking windows and keep status Active on Skype / Teams / Jabber using VBA scrip
With the pandemic pushing almost everyone to work from home and most of us are required to stay active on collaboration tools even if there is no need for you to sit in front of laptop. Like a friend of mine who has like 2-3 hours of dedicated work and calls and then its just staying idle but if he moves away from the screen, the laptop locks and his status on "Teams" turns to "Away", which is kind of bad. So to avoid that he tried lots of other stuff of which the best was to play a long YouTube video in the background but then since few months, YouTube started to pause the video until an action is taken by the user. Thus he was having difficult time to keep his status as "Active" but at the same time be able to move around in his house or probably take a small nap. I suggested a small VBA script which does the work. Now the key is to run a loop of code which presses a key which tricks the laptop and the communication app that the user is active. Though its a very basic code and it can be improvised as per your need. Here it is which did the trick for my friend.
You probably want to create a new macro enabled file and save this code. The code just keeps on saving the excel file by hitting Ctrl+S in loop over and over every 10 seconds.
Sub aa() Dim i As Integer For i = 1 To 1000 Application.SendKeys ("^s") Application.Wait (Now + TimeValue("0:00:10")) Next i End Sub
Another thing that can be done is to connect the laptop to an external speaker and put the notifications on maximum volume for any emails or any messages on Collaboration tools so that you wake up from your little sleep when something wants your attention.
By the way lots of my friends have told me that they are very comfortable working from home and their productivity has increased a lot and allowing them to maintain a very healthy life balance. Its time that companies plan to incorporate more working from home to get increased productivity.
If you have any other better ideas, please comment and we can have the discussion rolling.
Download the file here if you would like to have a ready made solution.
(If nothing happens when you click the link above then please right click and choose "Open in New Tab" that should download the file)
Watch the below video for more details.