Spreadsheet Document-Level Events

The following table includes the document-level events that are available for spreadsheets:
 

Command

Action

Activate

Executes when the spreadsheet receives the focus within the STATISTICA workspace.

BeforeClose

Executes when you close the spreadsheet. Before the document closes, the events within this function will first execute. An example of using this feature would be to add additional functionality, such as saving the file to multiple locations or exporting it to another application.

BeforeDoubleClick

Executes when you double-click anywhere on the spreadsheet. Before the clicked area goes into edit mode, the events within this function will first execute. Examples of using this feature would be to prevent users from altering a spreadsheet's content or to add additional functionality such as applying a custom format to the clicked area.

BeforePrint

Executes when you select a print option. Before the spreadsheet prints, the events within this function will first execute. Examples of using this feature would be to prevent users from printing the document or adding new functionality such as calling an alternate, customized printing dialog.

BeforeRightClick

Executes when you right-click anywhere on the spreadsheet. Before the shortcut menu appears, the events within this function will first execute. An example of using this feature would be to add additional functionality to displaying shortcut menus, such as highlighting the entire contents of the spreadsheet.

BeforeSave

Executes when you save changes made to the spreadsheet. Before the changes are actually saved, the events in this function will first execute. An example of using this feature would be to prevent users from permanently changing a spreadsheet.

DataChanged

Executes when data within a cell or block of cells has been altered. This will also execute when a variable's type or Display format has changed.

Deactivate

Executes when the spreadsheet has lost the focus to another window within STATISTICA.

OnClose

Executes when the spreadsheet is being closed.

Open

Executes when the spreadsheet is being opened. Note, this will not run unless autorun was specified when the macro was last edited.

SelectionChange

Executes when the focus within the spreadsheet has moved.

StructureChanged

Executes when the size of the spreadsheet is changed. Examples of events that will trigger this include the addition or deletion of variables/cases and block statistics being added to the spreadsheet.

For additional events, see STATISTICA Events, Application-Level Events, Graph Document-Level Events, Report Document-Level Events, and Workbook Document-Level Events.

For examples, see Application-Level Events Example and Document-Level Events Example.