Idle Event

Applies to:  IdleEvents object
See also:  Window object

Occurs when a thread becomes idle, or when the system becomes idle, depending on how the IdleEvents object was obtained.

Syntax:

Private Sub object_Idle()

The Idle event syntax has these parts:

Part Description
object The name of an IdleEvents object.  NB:  object must be declared using WithEvents.

Remarks:

Use the idle event to perform background processing.  The event handler for this event should be written in such a way as to return control to the system as soon as possible.

For example, if 1000 records need to be processed, then process one record in response to each Idle event.  If the system is still idle (or becomes idle again), then the event will be triggered again.

 

 

Home Copyright and Disclaimer