Load

Occurs when a form is loaded. For a startup form, occurs when an application starts as the result of a Load statement or as the result of a reference to an unloaded form's properties or controls.

Syntax

Private Sub Form_Load( )

Remarks

Typically, you use a Load event procedure to include initialization code for a form — for example, code that specifies default settings for controls, indicates contents to be loaded into ComboBox or ListBox controls, and initializes form-level variables.

Forms are not shown until you either use the Show method or set the Visible property to True.

Note When you create procedures for related events, such as Activate, GotFocus, Paint, and Resize, be sure that their actions do not conflict and that they do not cause recursive events.