ON.TIME() and OnTime Method Disable Windows Screen Saver

Article translations Article translations
Article ID: 89285 - View products that this article applies to.
This article was previously published under Q89285
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

SYMPTOMS

In Microsoft Excel, when you run a macro that contains an ON.TIME() function, if Microsoft Excel is the foreground application, your Windows screen saver will not activate until the macro specified in the ON.TIME() function is complete and an additional period of time equal to the screen saver delay has passed without a screen refresh.

One result of this is that any macro that uses the ON.TIME() function, such as the Microsoft Excel AUTOSAVE.XLA add-In, prevents the Windows screen saver from activating as long as an ON.TIME() function has been executed and is tracking time before running a macro.

In Microsoft Excel versions 5.0 and 7.0, when you run a Visual Basic procedure that contains OnTime method, your screen saver will not activate if Microsoft Excel is the foreground application until the OnTime setting is canceled.

CAUSE

You can use the ON.TIME() function or the OnTime method to run a macro at a designated time, or after a specified period of time has elapsed. After an ON.TIME() function or OnTime method has been executed, Microsoft Excel continuously checks the time in order to determine when to run the specified macro. This check results in a screen refresh while Microsoft Excel is the foreground application. The Windows screen saver does not activate until a period of time has elapsed without a screen refresh equal to its 'Delay' setting.

To clear a previously set OnTime procedure, run the OnTime method with the Schedule argument set to the value False.

REFERENCES

"Microsoft Excel Function Reference," version 4.0, pages 305-306

For More information about the OnTime Method, choose the Search button in the Visual Basic Reference and type:
OnTime Method

Properties

Article ID: 89285 - Last Review: October 14, 2013 - Revision: 2.3
APPLIES TO
  • Microsoft Excel 3.0 Standard Edition
  • Microsoft Excel 4.0 Standard Edition
  • Microsoft Excel 4.0a
  • Microsoft Excel 5.0 Standard Edition
  • Microsoft Excel 5.0c
  • Microsoft Excel 95 Standard Edition
  • Microsoft Excel 95a
Keywords: 
kbnosurvey kbarchive kbenv kbprogramming KB89285

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com