LostFocus Event

Microsoft Excel Visual Basic

LostFocus Event

       

Occurs when an ActiveX control loses input focus.

Private Sub object_LostFocus()

object   The name of an ActiveX control.

Example

This example runs when ListBox1 loses the focus.

Private Sub ListBox1_LostFocus()
    ' runs when list box loses the focus
End Sub