Inserts a function name at cursor position in the editable cell of a Spreadsheet control found in a window.

Example

// Insert the SUM function as formula // an opening bracket is added and switch to assisted cell selection // to choose the cells onto which the sum will be applied SpreadsheetInputFunction(PSHEET_Spreadsheet, "SUM")

// Insert an entire formula // The formula in B3 corresponds to : "=SUM(ABS(-25);LOG(10))" PSHEET_Spreadsheet = "B3" SpreadsheetInputFunction(PSHEET_Spreadsheet, "SUM") SpreadsheetInputFunction(PSHEET_Spreadsheet, "ABS") SendKey("-25);") SpreadsheetInputFunction(PSHEET_Spreadsheet, "LOG") SendKey("10)){ENTER}")

Once the function name is inserted, an opening bracket is automatically added and the user is switched to assisted selection of cells onto which the function is applied, like if the function name was typed on the keyboard. The assisted cell selection stops when a character is typed by the user (closing bracket or any other character).

If the function name is inserted at the beginning of cell, a " = " sign is inserted before the function name (to indicate that the cell content is a formula).

This function switches the Spreadsheet control to edit for the content of current cell (if the Spreadsheet control was not in edit).

This function fills the list of functions recently used, available in the ribbon of control.