Info

Figure 9.5

Various actions for a control can be selected from the VBE dropdowns.

The controls are objects, like ActiveWorkbook. They have properties and methods, dependent on the type of control. Most of the programming for the controls is done behind the form, but if another module needs to refer to a control, the parent, which is the form, needs to be included with the object.

Private Sub btn_EmpCancel_Click() Unload Me End Sub

The previous code can be broken down into three sections:

■ btn_EmpCancel—Name given to the control

■ Unload Me—The code behind the control, in this case, unloading the form

0 0

Post a comment