Solved

screen saver alert

Posted on 2013-02-05
3
178 Views
Last Modified: 2013-09-25
I want to put off the screensaver working a macro in excel, which generates an event at regular intervals. is it possible
0
Comment
Question by:babisterzis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 26

Accepted Solution

by:
redmondb earned 500 total points
ID: 38856367
Hi, babisterzis.

Do you mean that you want a macro which will periodically do something which prevents the screensaver from activating? If so, the code below holds down the shift key for an instant every 5 seconds. It does this 10 times. Obviously both of these numbers can be changed as required.

I've successfully tested this with the Windows 7 screen-saver.
Option Explicit

Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Sub Shift_Loop()
Dim i As Long

For i = 1 To 10
    Sleep 5000
    DoEvents
    Debug.Print i
    SendKeys "+", False
Next

End Sub

Open in new window

Regards,
Brian.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question