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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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,224,827
Messages
6,181,195
Members
453,021
Latest member
pingpong7117

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