Solved

screen saver alert

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

728 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