Once the Person class has been completed, all of the functionality for your ActiveX component is finished. However, you must perform some simple housekeeping tasks to complete the entire component. First of all, every Visual Basic project must start from a form, or from a subroutine named Main. Your project does not have any forms, so you must provide a Sub Main subroutine to start the ActiveX component. A code module is the only component of Visual Basic that can contain the Sub Main procedure from which you start the application.
Add a module to your application by selecting Module from the Insert menu.
Add the Main procedure to the module by adding the following code:
Public Sub Main()
End Sub
It is not necessary to place any code in this new procedure. The Main procedure is simply a requirement of Visual Basic for creating the ActiveX component.
At this point, save your project in the \bookdata\project2 subfolder.