If you're like me, the first thing you want to do with a new programming language is to jump in and start programming. Well, that's exactly what we're going to do in this chapter. You will learn some of the fundamentals of Visual Basic programming by creating a working program. The program you create will be one that should be useful--a loan payment calculator.
A college English professor of mine was once describing different types of novelists: "A traditionalist author usually orders his story beginning-middle-end, a modernist might reverse that order, and a post-modernist would only include two of the three parts."
Unfortunately, authors of computer programs do not have that luxury. Due to the structured nature of computing, designing before coding is crucial to a project's success. New programmers have a tendency to resist this, but even with small programs you need to get into the habit of planning. If you do nothing else, sit down with a blank sheet of paper and make some notes about what you want the program to accomplish, and sketch out what the interface should look like.
NOTE: Please keep in mind that the strategy presented in this chapter is by no means the only approach to programming, but rather one set of guidelines.
The key steps in creating a computer program are the following:
These steps are very generalized and definitely not all-inclusive. As we discuss the following sample program, we'll list some Visual Basic-specific steps.
NOTE: If you are tackling a large project, breaking it down into smaller pieces will make it much more manageable. Many of Visual Basic's features (such as custom controls) can be used for dividing up a large project in a team environment. A structured, object-oriented approach is also worth investigating.
When starting a new project, it is tempting to just sit down and start hacking out code. After all, drawing the interface and writing the program code are the most fun and creative aspects of programming. However, a good program starts with a solid design. An in-depth flowchart might not be necessary for very small-scale projects, but on the other hand, it is never a good idea to start without a plan.
The design process should produce the following results:
For a program like the sample in this chapter, the design can be a simple statement of what the program should accomplish. For more complex programs, the design might include written criteria, data diagrams, flowcharts, a milestone document, and a test and acceptance plan. It is up to you and your client (the program's user) to determine the right level of documentation that is necessary for a given project. However, you should always make sure that the design is clearly spelled out, and you should always write it down.
Now let's specify the design of the sample program. In this chapter, you create a simple program that calculates the monthly payment of a loan. The program allows the user to input values for the amount of the loan (principal), the annual interest rate, and the length (term) of the loan. The program provides the user with a way of starting the calculation. Finally, the program verifies that the necessary information was entered, performs the calculation, and then displays the results to the user.
As you can see, in one short paragraph, I specified what the program would do, what information was required to perform the task, and provided some information about how the interface should be designed. That wasn't so bad, was it?
Now that we have specified the design of the program, it's time to get started with the actual creation of the program. (Note that I'm combining interface design and creation because our program is so simple.) Developing the user interface requires several Visual Basic controls from the Toolbox. You start out using just three controls. In the section "Enhancing Your Program," you learn how to use additional controls to make the loan calculator even better.
To start working on the sample program, you need to start Visual Basic; or if you are already in Visual Basic, you should start a new project by selecting File, New Project. Whichever you do, you are presented with the New Project dialog box (see Figures 3.1 and 3.2).
FIG. 3.1
The New Project dialog box that appears when you first start Visual Basic
5.
FIG. 3.2
The New Project dialog box that opens when you choose File,
New Project from within Visual Basic 5.
This dialog box provides you with a choice of application types that you can create. Because the first program is nothing fancy, choose to create a Standard EXE. This choice presents you with the design environment of Visual Basic, displayed in Figure 3.3.
See "Starting Up," Chapter 2
FIG. 3.3
After starting Visual Basic's design environment, you are ready to begin creating
your first program.
NOTE: Because the design environment is customizable, your screen might not look exactly like the one shown in Figure 3.3.
As you are working on your program, you need to save it so you can use it again. In fact, you should save your work often in case of a power failure or other problem. It's very good practice to save your projects as soon as you start working on them, and then save regularly as the work progresses. At the very least, you should save your program before the first time you run it. This way, if it causes your system to crash (yes, it happens to the best of us), you won't lose your work.
You can save your project by choosing File, Save Project from Visual Basic's menu system, or by clicking the Save Project button on the toolbar. The process of saving a project is a little more complex than you might expect; however, with a little practice you'll have no problem. In order to save a project, you must save each component of your project (each form, code module, and so on) into its own file and then save the project itself into its project file.
Look at the Project window on your Visual Basic desktop. It consists of a list of the components that make up the current project. The Forms folder under Project1 (the default name of a new project) contains exactly one entry--Form1, which is the one and only form in this application. Each form in a project is saved into its own file; the project (list) itself is saved into a separate file.
When you choose to save the project, Visual Basic first wants you to save the components (forms, for example) into their own files before saving the actual project file. The first time you save the project, you are led through a series of Save File As dialog boxes so you can specify the name and location of each file that makes up your project. Subsequent project save operations simply resave the components using the same file names as before, unless new components have been added to the project since the last save. In this case, the Save File As dialog box is presented for each new component (see Figure 3.4).
FIG. 3.4
The Save File As dialog box allows you to specify the name and location of
your program files.
TIP: On my hard drive, I have created a VBCODE subdirectory. Underneath that I create a subdirectory, (for example, LOANCALC) for each new Visual Basic project. This makes it easy to keep your project files organized in one place.
TIP: You can have Visual Basic automatically save your program before you run it by setting the option in the Environment Options dialog box. You can choose to have Visual Basic save your program, prompt you to save changes, or not save the changes before running the program.
Most programs need a way for users to enter information. There are a number of Visual Basic controls that you can use for input. The first thing to do is look in the Toolbox and see which controls you need. The user interface for your loan calculator is responsible for accepting input, displaying output, and calling functions that perform the loan calculations. So, the three controls that you use initially are the TextBox, the Label, and the CommandButton. These controls are part of the basic set of controls that you find in the Toolbox when you start Visual Basic (see Figure 3.5).
FIG. 3.5
Visual Basic's controls are the building blocks of your programs.
The most commonly used control is the TextBox control, also known simply as a text box. The name text box is, in this case, self-explanatory (it's a box that accepts and displays text). An analogy would be boxes you see when filling out a job application or a survey. You might find a box called First Name. It can both accept user input (from a pen) and display information. This real-world box is very similar to a Visual Basic TextBox.
Without something like a TextBox control, displaying a piece of information on the screen would be quite complicated. In olden days, your program would have to determine where to position the information on the screen, determine the size of the display area, and then print the information to the desired spot. With a text box, you only are concerned with what to display, and the control takes care of the rest. If you don't like where the information is displayed, you simply reposition your text box on the form. No coding is required. Similarly, if you don't like the appearance of the text box, you can easily change the text font or the colors.
Accepting user input works the same way. Although the TextBox control sounds simple, it does a lot of work behind the scenes:
Adding a Control to Your Form To use a control in your program, you must first put it on a form. The first control we'll add for the loan calculator is a TextBox control. To do this, follow these steps:
FIG. 3.6
You place controls on your form by using the mouse to set their position and
size.
FIG. 3.7
The completed text box appears on the form and is selected (notice the selection/resizing
handles).
TIP: You can also add a control to a form by double-clicking the control's icon in the Toolbox. This places a control of a default size in the center of the form. You can then move and resize the control to your liking with the selection/resizing handles, as described in the upcoming section, "Moving and Resizing a Text Box."
Setting the Properties of the Control After you have added a text box to your form, you need to set some of its properties. Remember, properties control the appearance and behavior of an object. The two properties you need to set for your text box are the Name and Text properties. The Name property is very important, because it is used in your program code to identify the control. If you don't know a control's name, you cannot write code to communicate with it. Just in case you forget to assign a name to a text box, Visual Basic initially assigns one for you. For the first text box on the form, this default name is Text1. For the second text box, the name is Text2, and so on. You could just use the default names, but that would not be a good programming practice. Remember that you will use these names to identify the text boxes in your code. A descriptive name makes it easier to maintain your program when you need to make the inevitable changes. For instance, if you have text boxes for first name, last name, and address, it is easier to remember which text box is which if they are named txtLname, txtFname, and txtAddress rather than Text1, Text2, and Text3.
NOTE: The text box names I suggested begin with the prefix txt. A three-character prefix is commonly used to identify the type of control, in this case a text box. Other prefixes that are often used to name controls include lbl for labels and cmd for command buttons.
See "Referencing Forms and Controls from Your Code," Chapter 7
To change the name of your text box, go to the Name property in the Properties window and type in a new name in the edit area for the property. For the first text box in the sample program, use the name txtPrincipal (see Figure 3.8).
FIG. 3.8
Use the Properties window to set the various properties of the controls in
your project.
The other property that you need to set for the text box is its Text property. At any given point in time, the Text property contains the actual text (characters) that appears in the text box. You might notice that, by default, the text box displays the name originally assigned to the control by Visual Basic (even if you have subsequently changed the Name property). Typically, you will want different text displayed when your form is shown; and quite often, you will want the text box to appear blank. To clear the text box, go to the Text property in the Properties window, highlight the text in the edit area, and press the Delete key. If you want any other text to appear in the text box, simply type in the desired text in the edit area.
NOTE: Keep in mind that right now you are in design mode; once the program is running you can only change properties with code.
Adding the Remaining Text Boxes ow that you have added one text box to the form, it should be a simple matter to add the other text boxes that are needed for the sample program. Go ahead and add three more text boxes and name them txtTerm, txtInterest, and txtPayment. Go ahead and remove the default value from the Text property of each text box, as well. When you have finished adding the text boxes, your form should look similar to the one in Figure 3.9.
FIG. 3.9
The Loan Calculator program requires four text boxes.
TIP: To draw multiple controls of the same type, hold down the Ctrl key when you select the control in the Toolbox. This keeps the Toolbox from switching back to the mouse pointer and allows you to draw multiple instances of the control.
If your form does not look like the one in the figure, no problem. The great thing about a visual design environment is that you can easily change the appearance of an object on the form.
Moving and Resizing a Text Box You can move the text box to a ew location or change its size with just mouse movements. To move a control, simply click it with the mouse and then drag it to a new location. If you pause while you are dragging the control, a ToolTip is displayed showing you the position of the upper-left corner of the control. To change the size of a control, select the control on the form (again by clicking it) and then click and drag one of the eight sizing handles (small squares positioned on each edge and each corner) on the control to make it a different size. This is similar to resizing a window in any other program. A control's sizing handles are illustrated in Figure 3.10.
Now that you have created four text boxes to accept input, you need to label them so the user knows what information to enter. To make room for the labels, let's move the four text boxes to the right side of the form. Rather than moving them one at a time, we can select all of them and move the group. To do this, first hold down the Ctrl key. Next, single-click each of the text boxes with the mouse so the selection handles are visible. Finally, while holding the mouse button down, drag the group of controls to the right side of the form. When finished, your form should look similar to Figure 3.11.
FIG. 3.10
A control's sizing handles let you use the mouse to change its size.
FIG. 3.11
Selecting a group of controls, as in the example pictured here, allows you
to move them all at once.
As we mentioned earlier, you need some type of on-screen indication of what information the text boxes hold (the names that you gave the controls previously are for use within the code and are not displayed on the screen). The easiest way to do this is to place a Label control next to each text box. The label's caption can contain a description of the data to be entered.
In many respects, a label control is very similar to a text box. It can contain letters, numbers, or dates. It can contain a single word or an entire paragraph. Figure 3.12 shows several label controls that illustrate the diversity of appearances you can get. Using the earlier analogy of a job application, the labels are like the words printed on the form to tell you where to write your name or other information.
FIG. 3.12
Labels can take on many sizes and appearances.
The key difference between a label control and a text box is that the information in a Label control can't be edited by the user. Also, the Label control does not have a Text property. Instead, the information you see in the Label control is stored in its Caption property.
To add a label control to your program, follow these steps:
By adding this label, you have now made the program easier to use by telling the users where to enter the amount of the loan. As you did with the text boxes for the program, go ahead and create the rest of the labels. You need to create one label to go along with each of the text boxes. Table 3.1 lists the recommended Name and Caption property settings. When you have finished, your form should resemble Figure 3.13.
FIG. 3.13
Labels in the program tell the user what information to enter.
Label Name | Caption |
lblPrincipal | Principal: |
lblTerm | Term (Years): |
lblInterest | Interest Rate (%): |
lblPayment | Monthly Payment: |
TIP: To get your labels to right-align near the text boxes like they do in Figure 3.13, select the label controls and change the Alignment property to 1 - Right Justify. The Alignment property field in the Properties window has a drop-down list of alignment choices.
The last controls that you need for the sample program are CommandButton controls. While the TextBox and Label controls are designed for input and display, the CommandButton control is used to initiate a task, similar to a real-life pushbutton. You add a command button to your form the same way that you add the text boxes and labels--by drawing it on the form with the mouse.
First, click the CommandButton control in the Toolbox; then draw the first command button on the form and give it a unique name, just like you did for the other controls. The name used in the sample project is cmdCalculate. Also, command buttons, like labels, have a caption. The caption appears on the button's face and typically describes what the button does. For the sample program, change the Caption property to Calculate Payment. Draw a second command button, cmdExit, and set its Caption property to Exit. Your form should now look like the one in Figure 3.14.
FIG. 3.14
CommandButton controls allow the user to initiate actions in the program.
NOTE: In Visual Basic 5, the CommandButton control has undergone a big improvement: you can add a graphic to it with the Style and Picture properties. In previous versions of Visual Basic, you couldn't do this with a standard CommandButton control.
At this point, the interface portion of our sample program is complete. However, if you were to run the program, it wouldn't really do anything. Sure, you could type some numbers into the text boxes, but the program would not perform any calculations on them--which is why you were writing it in the first place.
In order to make your program perform a task, you need to write some code. And in order for the program to perform the task(s), you must have a way of telling the program when to perform which task. You do this by creating event procedures, which are segments of code that are executed when a particular event (the Click event, for example) occurs to a particular object (the cmdExit command button, for example). We discuss event procedures in more detail a little later.
Let's start with the easiest code, the Exit button. Double-click the button to bring up the form's Code window, and you might notice a subroutine template, which consists of two lines. These lines, illustrated in Figure 3.15, define the beginning and the end of the event procedure. The default event for command buttons is the Mouse click, so you see the cmdExit_Click subroutine.
FIG. 3.15
Visual Basic provides a skeleton procedure, or template, for each event.
Any code you place in this procedure (or sub) is executed whenever the user clicks the CommandButton control. Press Tab to indent the code (that makes it easier to read) and then type the word End into the subroutine so that it looks like this code:
Private Sub cmdExit_Click() End End Sub
At this point, you can run the program (by clicking the Start button, by selecting Run, Start from Visual Basic's menu system, or by pressing F5); then click the Exit button to stop it.
In Visual Basic, a program typically takes actions in response to an event. In the preceding, you defined the Click event procedure for cmdExit. An event is something that happens to an object either as the result of a user action, an action instigated by another part of the program, or some action from the operating system. Examples of events are the user's pressing a key, the user's moving a mouse, the value of a control being changed, or a specified amount of time elapsing. Whenever the user initiates the Click event for cmdExit, the program executes cmdExit's Click event procedure, which simply consists of the End statement.
See "Handling Events in Your Programs," Chapter 7
Each control you use in your programs has been set up to recognize certain types of events. Some controls can respond to mouse clicks, while other controls can respond to changes in their values. If you want a control in your program to respond to a specific event, you must place code in the appropriate event procedure for that control. Otherwise, your program ignores the event.
Look near the top of the Code window, and you will notice two drop-down boxes. The box on the left lists all of the objects that have been placed on the form (as well as the form itself); the one on the right lists the available events for the object that is currently selected in the leftmost box. If you browse through the right-hand list, you'll see that the CommandButton control can respond to more events than just a mouse click. One helpful way to think of your form code is like a long text file, and the Code window is a navigation tool to quickly jump between different procedures.
The easiest way to begin entering code is to double-click the control that you want to have respond to an event. Double-clicking the control opens the form's Code window, automatically selecting the appropriate object, as shown in Figure 3.16.
NOTE: Double-clicking a control is a shortcut to the code for the control's default event, or whichever event has code in it. For example, the logical main purpose of a CommandButton control is the Click event. However, if there is no code in a command button's Click event procedure, but there is code in the MouseMove event, double-clicking the control would display the MouseMove event procedure.
FIG. 3.16
Double-clicking the cmdCalculate command button opens the Code window and
places the cursor in cmdCalculate's Click event procedure.
TIP: You can also open the Code window by pressing the F7 key, by clicking the View Code button in the Project window, or by selecting View, Code from the menu system.
The next event procedure code to write is for the cmdCalculate command button, because this is the control the user uses to start the calculation:
Private Sub cmdCalculate_Click() End Sub
You place the code to calculate the loan payment between the two lines marking the beginning and end of the procedure. (Notice that the procedure name, cmdCalculate_Click, is created from the name of the control and the name of the event.)
The actual code that is used in this event procedure consists of two parts--the variable declarations and the procedure code. This section explains the code you need to enter for the Calculate Payment button.
Variable Declarations The variable declarations area is where you tell Visual Basic the names of the variables that you will be using in the procedure and what type of information each variable will store. Although Visual Basic does not require you to declare your variables, it's good practice to do so and will save you a number of headaches.
TIP: Always declare your variables! In the Tools, Options menu item, under the Editor tab, make sure Require Variable Declaration is checked. This causes Visual Basic to report an error if you attempt to use a variable that hasn't been declared (for example, if you inadvertently misspell the variable's name).
The declarations for the sample code are shown in the following code segment. Figure 3.17 shows the variable declarations as they should appear in the subroutine for the Calculate Payment button.
Dim crPrincipal As Currency, sgInterest As Single Dim crPayment As Currency, inTerm As Integer Dim sgFctr As Single
FIG. 3.17
The first code entered in cmdCalculate's Click event procedure should
be the variable declarations, as pictured here.
As you might notice in the preceding example, the general format for variable declarations is the word Dim, followed by a variable name of your choosing, followed by As, and the variable's type. Variables can be declared on separate lines or together on the same line.
As with object names, you should follow a aming standard. The naming standard I use for variables uses the first two characters of the variable name as a prefix designating its type; the rest of the name describes its purpose. The variable named crPrincipal, for example, is a Currency type variable that stores the principal amount; sgInterest is a Single type variable storing the interest rate. We discuss variable naming conventions more thoroughly in Chapter 8, "Programming Basics."
TIP: A common beginner mistake is a statement like Dim x, y, z As Integer. In this case, only z would be an Integer, while x and y would be a special type called a Variant. The Variant data type is a special type discussed later in the book. The correct syntax would be to place the declarations on a separate line or place the words As Integer after each variable name.
See "Variable Declarations," Chapter 8
Procedure Code The procedure code is the part of the subroutine that does the actual work. In the case of the sample program, the code retrieves the input values from the text boxes, performs the calculation, and inserts the monthly payment value into the appropriate text box. This code is shown in Listing 3.1. Figure 3.18 shows how the procedure code actually appears in the subroutine.
crPrincipal = txtPrincipal.Text sgInterest = txtInterest.Text / 1200 inTerm = txtTerm.Text sgFctr = (1 + sgInterest) ^ (inTerm * 12) crPayment = sgInterest * sgFctr * crPrincipal / (sgFctr - 1) txtPayment.Text = Format(crPayment, "Fixed")
FIG. 3.18
Entering the calculation code completes the Click event procedure
for cmdCalculate.
Now that we have created the event procedure, let's briefly review what it does:
NOTE: In the example code we referred to the text boxes by specifying both the name of the control and the name of the property, separated by a dot (or period). This gives rise to the term dot notation. Using dot notation, you can retrieve or set the value of almost any property of a control. Both our code and descriptions of the controls we've drawn are located within the same form. If we needed our code to access one of the controls from another form or module, the form name would be added to the beginning of the dot notation, as in Form1.txtPrincipal.Text.
NOTE: The Text property of a text box is known as its "default" property. This means that if you do not specify a property name, the Text property is assumed for the text box; therefore, the last statement in Listing 3.1 could have been written txtPayment = Format(crPayment, "Fixed").
See "Referencing Forms and Controls from Your Code," Chapter 4
Now let's run the program and see if it works. To run the program, click the Start button on the Visual Basic toolbar; alternatively, choose Run, Start from the menu system, or press the F5 key. Visual Basic then compiles your program to check for errors, and, if none are found, your program runs. You can now enter values for the principal, term, and interest rate of the loan. Use the following values:
Principal | 75,000 |
Term | 30 |
Interest | 8.5 |
Then click the Calculate Payment button, and the monthly payment is displayed. The payment amount should be 576.69.
After you have finished testing the program and trying various combinations of values, you can return to the design environment by clicking the Exit button, or clicking the End button on Visual Basic's toolbar.
The loan payment calculator is contained in the file LOANCALC.VBP.
If the program will be used outside of the VB design environment, you need to compile the program. You can compile your program by choosing File, Make LOANCALC.EXE. Choosing this item causes Visual Basic to check your program for errors and then create an executable file that can be used by double-clicking it from Windows Explorer or a shortcut.
See "Compiling Your Program," Chapter 17
A loan payment calculator is a useful tool, but there are several things that you can do to the program to make it even more useful. Let's look at two enhancements that will help you learn a little more about Visual Basic programming techniques.
The first enhancement you will make is one that allows you to perform other types of calculations besides the loan payment. With the enhancement, the user can solve for the principal of the loan or the term of the loan, in addition to solving for the payment. The second enhancement creates an amortization schedule so that the user can see how much interest and principal is paid with each monthly payment and how much total interest was paid for a period.
Our enhancement is to allow users to choose which part of the equation to solve for, so we need a control that lists some choices and allows the user to pick one. One such control is the OptionButton control. Option buttons work like the buttons on a blender or an old car radio. Only one of the buttons can be pressed at any one time. When the user turns one option on, all the other option buttons on the form are cleared.
Name | Caption |
optPrincipal | Calculate Principal |
optTerm | Calculate Term |
optPayment | Calculate Payment |
Which option has been selected is determined by the Value property of the option button. If a button's Value property is True, this button has been selected. Only one option button on a group can have a Value property of True. Because the payment calculation is the one most often used, we made this the default calculation. When you have finished setting up the option buttons, your form should look like the one in Figure 3.19.
FIG. 3.19
Only one OptionButton control can be selected at a time. You can create multiple
groups of Option buttons by placing them in a container control such as a frame.
See "Programming Basics," Chapter 8
The new Click event code with the If statements added is shown in Listing 3.2.
Dim m_Principal As Single, m_Interest As Single Dim m_Payment As Single, m_Term As Integer Dim m_fctr As Single m_Principal = txtPrincipal.Text m_Interest = txtInterest.Text / 1200 m_Term = txtTerm.Text m_Payment = txtPayment.Text If optPayment.Value = True Then m_fctr = (1 + m_Interest) ^ (m_Term * 12) m_Payment = m_Interest * m_fctr * m_Principal / (m_fctr - 1) txtPayment.Text = Format(m_Payment, "Fixed") End If If optPrincipal.Value = True Then m_fctr = (1 + m_Interest) ^ (m_Term * 12) m_Principal = m_Payment / (m_Interest * m_fctr / (m_fctr - 1)) txtPrincipal.Text = Format(m_Principal, "Fixed") End If If optTerm.Value = True Then m_fctr = Log(m_Payment) - Log(m_Payment - m_Interest * m_Principal) m_fctr2 = 12 * Log(1 + m_Interest) m_Term = m_fctr / m_fctr2 txtTerm.Text = Format(m_Term, "Fixed") End If
You can run this modified code to find out how large a loan you can afford for a given monthly payment.
The final enhancement that you will make to the loan program is to add an amortization schedule to the program. For this enhancement, you need a second command button to run the amortization calculation.
See "Using the Windows Standard Controls," Chapter 9
FIG. 3.20
A ListBox control holds the results of the amortization calculation.
As with the other capabilities, you need to add code to the Click event of cmdAmortize. To do this, simply double-click on cmdAmortize and enter the code in Listing 3.3.
The code in Listing 3.3 does the following:
Dim I As Integer, NumPay As Integer Dim m_int As Single, m_prin As Single, m_totint As Single Dim AddStr As String m_totint = 0 lstAmort.Clear AddStr = "Payment Interest Principal Total Int. Balance" lstAmort.AddItem AddStr NumPay = m_Term * 12 lstAmort.AddItem Space(20) & CStr(m_Principal) For I = 1 To NumPay m_int = m_Interest * m_Principal m_totint = m_totint + m_int m_prin = m_Payment - m_int If m_prin > m_Principal Then m_prin = m_Principal m_Principal = m_Principal - m_prin AddStr = Format(I, "###") & Space(10) & Format(m_int, "####0.00") AddStr = AddStr & Space(5) & Format(m_prin, "####0.00") & Space(5) AddStr = AddStr & Format(m_totint, "######0.00") & Space(5) AddStr = AddStr & Format(m_Principal, "######0.00") lstAmort.AddItem AddStr Next I
You can now run the program to determine the payments of a loan and then run the amortization schedule to view each individual payment. Figure 3.21 shows how the program appears after an amortization calculation.
FIG. 3.21
The amortization schedule provides loan payment details.
This chapter has introduced you to the basics of creating programs in Visual Basic. First, we discussed some concepts relating to program design and planning. Next, we created a sample program, which introduced a number of VB controls and programming concepts. This chapter was intended to get you comfortable with the Visual Basic programming environment. Other chapters in the book, such as the following, will provide you with more details about various aspects of creating programs:
© Copyright, Macmillan Computer Publishing. All rights reserved.