Example Program using two forms and a code module with global variables.

You will need to download all of these files to run the program(You may need to right click and choose to save the link(file) to your computer:

ExLab3.vbp     ExLab3.frm    ExLab3b.frm  ExLab3b.frx  ExLab3.bas

The program uses a form to ask the user for his/her name and age in years. The name is received using an inputbox and the age is input via a textbox. Then another form comes up which uses the age in years to calculate the age in months. A label displays the child's age in months and their name. Remember to be able to "share" the information between forms, global variables (ones that are declared PUBLIC in a code module) must be used.