ON Functions

ON functions allow you to specify a macro to be run when a certain event occurs. The ON functions turn on and off this special event handling.

ON functions are turned on by specifying the type of event to wait for, such as recalculation, a specific time, or a key to be pressed, and the macro to be run when the event occurs. ON functions are turned off by using the same formula but omitting the argument specifying the macro to be run.

ON.DATA Runs a macro when data is entered

ON.DOUBLECLICK Runs a macro when you double-click any cell or object on the specified document or double-click any item on the specified chart

ON.ENTRY Runs a macro when a document is recalculated

ON.KEY Runs a macro when a specified key is pressed

ON.RECALC Runs a macro when a document is recalculated

ON.SHEET Runs a macro when a specified sheet is selected

ON.TIME Runs a macro at a specific time

ON.WINDOW Runs a macro when you switch to a window