Share via


OLEObject.GotFocus Event

Excel Developer Reference

Occurs when an ActiveX control gets input focus.

Syntax

expression.GotFocus

expression   A variable that represents an OLEObject object.

Return Value
Nothing

Example

This example runs when ListBox1 gets the focus.

Visual Basic for Applications
  Private Sub ListBox1_GotFocus()
    ' runs when list box gets the focus
End Sub

See Also