VBA keep mouse moving or move every minute for example

m242

New Member
Joined
Aug 9, 2020
Messages
13
Office Version
  1. 2019
Platform
  1. Windows
Dear specialists,

I wonder if there is a VBA that can keep your mouse moving all the time or just every minute so your status on Teams stays on available.
Looking forward to your suggestions. Grts, M.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Upvote 0
Hi mrshl9898,

I've put your code into a push button and when I click it the mouse pointer circles around continiously and the cursor goes from A1 to A2 and back.
BUT it doesn't prevent the computer from going idle.
What I did before was running a video powerpoint and that worked for the idle part, NOT for the status which changes to 'away' on Teams.
So now I run both together on different screens: the computer screens are staying active AND the status on Teams stays on 'available', only if both xls and ppt are opened on screen, not minimalized to the bar below:giggle:
Thanks a lot for your input. If I could ask you one more thing it would be...is it possible to create a code to add to yours for opening the ppt automatically from a certain path?
 
Upvote 0
This should do it:

VBA Code:
Sub openppt()

Dim DestinationPPT As String
Dim PowerPointApp As PowerPoint.Application
Dim myPresentation As PowerPoint.Presentation

Set PowerPointApp = CreateObject("PowerPoint.Application")

DestinationPPT = "C:/blabla" 'change to suit
PowerPointApp.Presentations.Open (DestinationPPT)

End Sub

Just go to Tools>References and add this:

1615496687270.png
 
Upvote 0
Hi mrshl9898

Thank you very much for the code, it works fine.
General question: is it possible to write a code in VBA that moves your mouse pointer over the cells instead of the cursor?
 
Upvote 0
It does look like it, i'm not getting any to work however

 
Upvote 0
I think toggling Active Windows stops Teams going inactive.

I was using 13 macros all day for an automating task. I needed a macro to record the macro uses and Cummulative time savings. I created Macro L (on LinkedIn) in Excel which records every active window change. This was very surprising regarding burnout levels of work and mental load. I was accessing 2,500 Active windows in standard work day 7.3 hours.

It is a bit silly to try to appear always working at 100% It is important to take regular breaks. My Macro L will show logged off time for mid am/pm breaks and lunch if >=30min. You will be more productive with regular breaks, and the Macro L can prove this.

Most employers even if not explicit policy are probably using Internet browsing logs, key logging activity rather than the actual key strokes as this infringes privacy. It looks suspect if you are programming a mouse or key movement every few minutes without changing active windows.

Even when working on a document it is reasonable to work on one for a long time without changing focus.

All the effort to appear to be working, should be spent on working, or regular tech breaks. Trying to pin down line managers on break frequency and length is difficult. I think 10-15 mins mid am/pm is good to have a stretch if WFH and switch off. More productive at the start and end of a break rather than having fewer start stops.

I am working on a MsgBox to prompt me every 25 mins if I want to take a drink/WC/stretch break.If yes the MsgBox counts down on Minutes passed until the 5th minute to get back to work.This will be WFH Macro M (for Move). The Timer loop is reset to zero when you lock screen for a mid am/pm break or lunch.
 
Upvote 0

Forum statistics

Threads
1,215,338
Messages
6,124,358
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top