Trick screen saver

petereddy

New Member
Joined
Feb 6, 2014
Messages
43
Hi,

The common method I use for avoiding the group policy screen saver on my machine when I'm actively using my computer, but not necessarily typing, such as working from hard copies and with information on the screen, is to have Excel hit F15 every now and then:
VBA Code:
Sub startTheClock()
    Application.OnTime Now + 4 / 60 / 24, "hitf15"
End Sub
Sub hitF15()
    SendKeys "{F15}"
    startTheClock
End Sub
This definitely prevents the screen saver from starting, but it has the obvious unintended consequence of toggling NumLock.

Is there a method that has no unintended consequences?

I think I read somewhere when I first investigated how to prevent the screen saver from popping up at inopportune times that you could move the mouse an imperceptible amount. Is that an option with VBA? If so, how can you do it? If not, are there other alternatives.

Thanks for your help.

Peter
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Multiple F15 sends in the same procedure don't appear to toggle back but this looks like it works, although I have only done a very quick test.
VBA Code:
Sub startTheClock()
    Application.OnTime Now + 4 / 60 / 24, "hitf15"
End Sub
Sub hitF15()
    SendKeys "{F15}"
    Application.Wait Now + TimeValue("00:00:01")
    hitF15again
End Sub
Sub hitF15again()
    SendKeys "{F15}"
    startTheClock
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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