Basically all code in VB is placed in one of three containers
1. Forms
2. Modules
3. Classes
Forms and Classes can be used to conform with the majority of OO design, excluding principally inheritance. Modules sit outside that as separate peices of code. Despite the name module level variables are actually just variables placed within any of these containers, but outside of any functions or subs. Also module level variables are defined as Private, and hence only usable within that container.
In the case of your problem the container would be a form and the variables would be defined at the top of the form code before any functions.
Form load is an event function, at the top of the vb code window when looking at your form there are two drop down boxes, the first for objects and the second for events that can occur on those objects (if (General) is selected then the containers functions and subroutines are listed). These boxes have a dual purpose, to easily navigate to the desired function and to create the shell of event handlers. In order to create the form load event do the following
1. Open the code window for your form
2. Select Form from the object box
3. Select Load from the event box
This will either take you to an already created Load event, or create an empty procedure to handle that event.
Having said all that to make it easy you could just put the whole thing under the click event of your command button. But it's best to learn this stuff anyway.