Computer Learning Zone CLZ Access Excel Word Windows

The main hope of a nation lies in the proper education of its youth

-Desiderius Erasmus Roterodamus
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
 

You don't have access to: Review & What's Next
 
Home > Courses > Visual Basic > VB 6 > 102 > < 101 | 103 >
VB 102

If Then Else, InputBox, ComboBox, Loops, PMT


 S  M  L  XL  FS  |  Slo  Reg  Fast  2x  |  Bookmark Buy Now

          Only $1
          Members pay as low as $0.50

Welcome to Visual Basic Beginner 102. In this course you will learn how to expand the IF-THEN-ELSE statement with ELSEIF and ELSE clauses in Visual Basic, gather information from users with input boxes and combo boxes, use variables for storing and processing data, and generate random numbers. We will also cover adding comments to code, creating for loops, and go through building both an image viewer and a basic loan calculator to reinforce these programming concepts.

Lessons

Resources

Lesson Summary

Welcome! If Then Else, Input & Combo Boxes - In this lesson, we will introduce Visual Basic 102 using Visual Basic. We will review objectives such as expanding the IF-THEN statement with ELSEIF and ELSE clauses, getting user input through input boxes, letting users select options with combo boxes, discussing variables for storing information, generating random numbers, commenting code, and using FOR loops. We will talk about creating an image viewer and building a simple loan calculator. This lesson recommends prior completion of Visual Basic 101 and will use Microsoft Visual Basic along with Windows, but the content applies to most versions.

XXXXX

Lesson 1: If Then Else for Commission - In Lesson 1, we will walk through how to use the If Then Else statement in Visual Basic to create a program for calculating sales commissions. We start by designing a form with text boxes for sales amount, commission rate, commission, and sales rep name, and a Calculate button. I will show you how to write code behind the button to determine commission rates based on the sales rep using If, ElseIf, and Else clauses, and discuss how these make your code more efficient and responsive to different user inputs.

XXXXX

Lesson 2: InputBox Prompts & ComboBox List - In Lesson 2, we will learn how to use the InputBox function to prompt users for data and how to add a ComboBox control to let users select from a list of options. We will walk through updating our code so the program asks for a commission rate when an unknown sales rep is entered, and I will show you how to add and configure a ComboBox to display valid sales rep names. We will also discuss how the ComboBox does not restrict users to the list, but makes it easier for them to choose correct options.

XXXXX

Lesson 3: Math Quiz: Random Numbers & Vars - In this lesson, we will walk through creating a math quiz program. We will learn how to generate random numbers using the RND and Randomize functions, how to convert them into integers within a specific range, and how to store values in variables using explicit and implicit definitions. I will show you how to build the interface with text boxes and command buttons, check the user's answers against the correct one, and add comments to your code for clarity. By the end, you will see how these steps come together to make a basic math quiz.

XXXXX

Lesson 4: For Loops: Multiplication Quiz - In this lesson, we will walk through creating a simple math quiz program that uses a for loop to test multiplication facts. You will see how to set up a form with text boxes for selecting the number to study and how many questions to include, and a button to start the quiz. We will discuss using a for-next loop to ask a series of multiplication questions, how to prompt the user for answers, handle input errors, and display feedback on whether each answer is correct or incorrect. This lesson demonstrates the fundamentals of implementing a for loop in a quiz scenario.

XXXXX

Lesson 5: Load & Show Bitmap Images - In this lesson, we will walk through how to create a simple Image Viewer using the image control in Visual Basic. I will show you how to set up a form with a text box for file names, a button to load images, and an image control to display Windows Bitmap files. We will use example image files from your Windows folder and write basic code to load and display the selected image in the form, offering a hands-on introduction to working with images and graphics in VB.

XXXXX

Lesson 6: Monthly Loan Payment with PMT - In this lesson, we will build a loan calculator and learn how to use the PMT function to calculate monthly loan payments based on the loan amount, interest rate, and loan term in months. I will show you how to create text boxes for user input, set default values, add a button to perform the calculation, and use the PMT function in code. We will also discuss formatting the result as a currency value and addressing common issues like negative payment values. This process will help you calculate any monthly payment for a loan using the loan calculator.

XXXXX

Lesson 7: If Then Else, Loops, Inputs, More - In this course we learned about using if, then, else, if, and else clauses, how to get user input through an input box, and how to let users select from a list with a combo box. We discussed working with memory variables, using dim, generating random numbers for a math quiz, and inserting comments. We covered how to use a for loop to iterate from 1 to any variable number. We also built an image viewer for bitmap images and created a simple loan calculator. Finally, you are encouraged to take a skills check and review additional available courses.

XXXXX

Navigation

Keywords

If Then Else, InputBox, ComboBox, for loop, random numbers, math quiz, commission calculation, image viewer, loan calculator, PMT function, variables, dim, comments in code, bitmap image, multiplication table quiz, user input

 

Start a NEW Conversation
 
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
 
Subscribe
Subscribe to VB 102
Get notifications when this page is updated
 
Intro In this lesson, you will learn how to expand your programming skills in Microsoft Visual Basic 6.0 by working with more advanced IF-THEN-ELSEIF-ELSE statements, gathering user input with input boxes, and offering choices via combo boxes. We will also cover using variables, generating random numbers, adding comments to your code, and creating FOR loops. Plus, you'll see how to build an image viewer and a simple loan calculator. This is Visual Basic 102.
Transcript Welcome to Visual Basic 102 using Visual Basic, brought to you by 599CD.com. I am your instructor, Richard Rost.

Let's go over the objectives for today's class.

We're going to expand upon some of the material that we learned in VB 101, like the IF-THEN statement. We're going to expand it to include the ELSEIF and ELSE clauses today.

We're going to teach you how to get input from the user in the form of an input box. We'll teach you how to let your users select from a list of options using a combo box.

We're going to talk about variables and how they work to store temporary information in the computer's memory. We'll teach you how to generate random numbers. We'll show you how to properly comment your code.

We'll learn how to use a FOR loop to loop through numbers. We'll have some fun creating an image viewer. And we're going to build a simple loan calculator at the end of class.

This class does have a prerequisite of Visual Basic 101. We strongly recommend that you take VB 101 before taking this class. If you have not taken VB 101 yet, head on over to 599cd.com to get your copy.

In this class, we're going to use Microsoft Visual Basic 6.0, along with Windows XP. This course is valid for any version of Windows. It does not matter what version of Windows you have. If you're using Visual Basic 5, you should not notice much of a difference at all. Likewise, VB.NET users should also be able to use the lessons in this course. Just make sure that you're using a Windows application.
Quiz Q1. Which statement is being expanded upon in this class compared to VB 101?
A. IF-THEN
B. SELECT CASE
C. DO WHILE
D. GOTO

Q2. What is the main purpose of variables in Visual Basic according to the lesson?
A. To store temporary information in the computer's memory
B. To permanently store data on the hard drive
C. To create graphical user interfaces
D. To generate random numbers

Q3. What new control will you learn to use for allowing users to select from a list in this class?
A. Combo box
B. Command button
C. Text box
D. Label

Q4. How will users learn to generate random numbers in this course?
A. Through Visual Basic programming techniques
B. By using an external calculator
C. By randomly pressing keys
D. Through a database query

Q5. What feature will be discussed so you can identify or explain parts of your code?
A. Code commenting
B. Database indexing
C. Data encryption
D. Network sharing

Q6. What looping structure will be covered for repeating actions a certain number of times?
A. FOR loop
B. WHILE loop
C. DO UNTIL loop
D. SWITCH loop

Q7. What type of simple application will you build at the end of this class?
A. Loan calculator
B. Web browser
C. Video player
D. Address book

Q8. Which version of Visual Basic will be mainly used in this class?
A. Visual Basic 6.0
B. Visual Basic 3.0
C. Visual Basic for Applications (VBA)
D. Visual Basic 1.0

Q9. Is this course applicable for VB.NET users?
A. Yes, as long as a Windows application is used
B. No, only works in VB 6.0
C. Only on Mac OS
D. Only if using databases

Q10. What prerequisite is recommended for this class?
A. Visual Basic 101
B. Access 101
C. SQL 101
D. C# 101

Answers: 1-A; 2-A; 3-A; 4-A; 5-A; 6-A; 7-A; 8-A; 9-A; 10-A

DISCLAIMER: Quiz questions are AI generated. If you find any that are wrong, don't make sense, or aren't related to the video topic at hand, then please post a comment and let me know. Thanks.
Summary Today's video from Visual Basic Learning Zone is Visual Basic 102 using Visual Basic, and I am your instructor, Richard Rost.

In this class, I will build on concepts introduced in Visual Basic 101, such as the IF-THEN statement. Today, you will see how to enhance these conditional structures with ELSEIF and ELSE clauses to give your applications more flexibility in decision making.

We will cover how to gather input from users with an input box and guide you through letting users choose from a selection of options using a combo box. Understanding how to use these controls is essential for creating interactive applications.

You will learn all about variables and their role in storing temporary information in your computer's memory. I will also demonstrate how to generate random numbers, which can be useful for all kinds of programming scenarios, from games to simulations. Additionally, I'll show you the best way to comment your code so that both you and others can understand it later.

We will explore how to use a FOR loop to iterate through numbers, a fundamental technique for automating repetitive tasks. To apply what you've learned, we'll put together a simple image viewer and, as a culminating project, build a basic loan calculator by the end of the class.

Please note that this class assumes you already have a solid foundation in Visual Basic, specifically from taking Visual Basic 101. If you have not yet completed that prerequisite, I highly recommend visiting 599cd.com to get started with VB 101 before moving on to this course.

For this class, I will be using Microsoft Visual Basic 6.0 on Windows XP, but the instruction applies to all versions of Windows. The version of Windows you use does not matter. If you are running Visual Basic 5, you will find minimal differences. VB.NET users can also follow along, as the lessons are applicable as long as you are working with Windows applications.

You can find a complete video tutorial with step-by-step instructions on everything discussed here on my website at the link below. Live long and prosper, my friends.
Topic List Using IF-THEN with ELSEIF and ELSE
Getting user input with InputBox
Creating and using combo boxes for options
Understanding and using variables
Generating random numbers
Adding comments to your code
Using FOR loops to iterate numbers
Creating an image viewer application
Building a simple loan calculator
 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/30/2026 3:32:55 AM. PLT: 1s
Keywords: If Then Else, InputBox, ComboBox, for loop, random numbers, math quiz, commission calculation, image viewer, loan calculator, PMT function, variables, dim, comments in code, bitmap image, multiplication table quiz, user input  PermaLink  How To Use If Then Else Input Combo Boxes Loops Random Numbers and Loan Calculator in Visual Basic 6