Occurs whenever the user enters edit mode while the mouse pointer is in a cell.
Private Sub Object_StartEdit (ByVal Selection As Object, ByVal InitialValue As ByRef, ByVal Cancel As ByRef, ByVal ErrorDescription As ByRef)
Object The name of the Spreadsheet object that you are trapping this event for.
Selection The currently selected range of cells.
InitialValue Use the Value property of this object to return or set the initial value to be used when editing a cell.
Cancel Set the Value property of this object to True to prevent the user from entering edit mode.
ErrorDescription Set the Value property of this object to a message that you want to display to the user.
StartEdit Event as it applies to the PivotTable object.
Occurs whenever the user enters edit mode in a detail cell.
Private Sub Object _StartEdit (ByVal Selection As Object, ByVal ActiveObject As Object, ByVal InitialValue As ByRef, ByVal ArrowMode As ByRef, ByVal CaretPosition As ByRef, ByVal Cancel As ByRef, ByVal ErrorDescription As ByRef)
Object The name of the PivotTable object that you are trapping this event for.
Selection The currently selected range of cells.
ActiveObject The active object.
InitialValue Use the Value property of this object to return or set the initial value to be used when editing a cell.
ArrowMode Specifies how the left and right arrows function while the user is in edit mode. Set the Value property of this object to a PivotArrowModeEnum constant.
PivotArrowModeEnum can be one of these PivotArrowModeEnum constants. |
plArrowModeAccept Accept the edit and move to the next cell. |
plArrowModeEdit Move the insertion point left or right one position within the cell. |
CaretPosition Specifies the position of the insertion point within the cell. Set the Value property of this object to a PivotCaretPositionEnum constant.
PivotCaretPositionEnum can be one of these PivotCaretPositionEnum constants. |
plCaretPositionAtEnd |
plCaretPositionAtMouse |
Cancel Set the Value property of this object to True to prevent the user from entering edit mode.
ErrorDescription Set the Value property of this object to a message that you want to display to the user.
Remarks
For information about using events with VBScript, see Declaring and Using Event Procedures in VBScript .