GotFocus

This event occurs when an object receives the focus.

Syntax

Private Sub object_GotFocus( )

Parameters

object
Object expression that evaluates to a control or Form object.

Remarks

An object can receive the focus only if its Enabled and Visible properties are set to True. A form can receive the focus only if all visible controls are disabled.