Solved

screen saver alert

Posted on 2013-02-05
3
176 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
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

733 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