Stop computer from locking windows and keep status Active on Skype / Teams / Jabber using VBA script

June 11, 2020

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.

 

 

Please reload

Featured Posts

Excel Demo Video

November 14, 2014

1/2
Please reload

Recent Posts

November 14, 2014

Please reload

Search By Tags