Fired when the user attempts to edit a non-editable cell.
Parameters
Parameter | Description |
---|---|
Cell | The cell the user attempted to edit |
Count | The number of attempts since the cell was selected |
Text | The text received during the attempt to edit the cell |
Remarks
The OnEditAttempt event fires when the user attempts to edit a cell whose CellProtection is set to "Selectable". This give you the opportunity to notify the user as to why he/she cannot edit the cell. The reason this event only applies to "Selectable" cells is that users are allowed to enter into edit mode for "Read Only" cells and can never even select "Full" protected cells.
The Cell parameter indicates the cell the user attempted to edit. It contains the column and row location delimited by a semi-colon. For example, the top left cell would be "1;1".
The Count parameter indicates the number of attempts to edit the cell since the user navigated to it. This can be useful if you don't want to show a message for every edit attempt. Perhaps you'll want to show a message for the first attempt and maybe every ten subsequent attempts.
The Text parameter contains the character(s) received when the user attempted to edit. For now, this is always one character--that is, the character the user pressed in his/her attempt to edit the cell.
Example
Transfer Param1 to Cell Transfer Param2 to Count Transfer Param3 to Text // If the user is attempting to edit for the first time, // let them know that they can't (by using a spiffy // balloon tooltip) If Count EQ 1 then Config = "" Config<1> = "This cell cannot be edited." ;// Message Config<2> = "Cell Protected" ;// Title Config<3> = 3 ;// "Stop" icon Config<4> = 4000 ;// 4 second timer Convert ';' to @FM in Cell rv = Send_Message(@Window:".OLE_EDITTABLE", "OLE.ShowBalloonTooltip"