GotFocus Event [Excel 2003 VBA Language Reference]

Occurs when an ActiveX control gets input focus.

Private Subobject**_GotFocus()**

object The name of an ActiveX control.

Example

This example runs when ListBox1 gets the focus.

Private Sub ListBox1_GotFocus()
    ' runs when list box gets the focus
End Sub

Applies to | OLEObject Object