An investment in knowledge
pays the best interest.
-Benjamin Franklin
Home   News   Tips   Glossary   Templates   Forums   Help   Logon   Order  
Courses - Microsoft Visual Basic 101
Description: Introduction to Microsoft Visual Basic
Running Time: 69 minutes
Pre-Requisites: Windows 101 recommended
Windows 102 or Windows 110 recommended
Versions: We use Microsoft Visual Basic 6.0, but lessons are valid for most earlier versions of VB, including 4 and 5. If you have VB.NET or VB 2005, the Visual Basic code we use is similar, but the programming interface has changed. These VB courses do NOT cover VBA (Visual Basic for Applications) which is what you need for Microsoft Office programming. For VBA, see the individual Office applications (Word, Excel, Access, etc.) Click here for more information on VB.NET courses.

Order Now: $5.99



 Click here for the Teacher's Outline
Notice: this course covers the older Visual Basic 6.0 programming application. Microsoft no longer sells VB6. If you want to learn VB6, you'll have to find a used copy somewhere like eBay or Craigslist. We will be updating this course for use with Visual Basic 2013 soon. If you've purchased this course within the last year, you'll get a free upgrade when it's released.

If you want to learn how to program in Visual Basic, this is the course for you. This course is designed for students who have never programmed before. However, even if you have been using Visual Basic for some time, you will benefit from the good, solid fundamentals that this course teaches - it's a great refresher for experienced developers as well. We have also had students come back and tell us that they picked up a few tips and tricks, even though they've been programming for years with Visual Basic.

We'll begin by talking about some of the fundamentals of programming, such as definitions, terminology, and such. We'll talk about Object-Oriented Programming, and how Windows programming is different from classic DOS-based programs. We'll discuss properties, methods, and events, and other VB-specific terms.


Our goal, however, is to get you building a program in today's class, so we're not going to spend too much time on theory and definitions. We'll get right into building a basic calculator application. We'll show you how to create a basic VB Project. We'll show you around the VB interface, and what all of the different windows, frames, and options are.


We'll discuss forms and how they work. We'll create some command buttons and text boxes. We'll talk about object properties. We'll discuss subroutines, and we'll write some code to make our command buttons come alive. We'll learn about basic functions and statements, like MsgBox. We'll even write the classic "Hello World" application that most programming courses start with. Yes, it's cliché, but we couldn't resist.


Next we'll spend time going over object properties in detail. We'll show you how to change object properties such as name, caption, colors, and so on. We'll discuss proper naming conventions for your objects. After properties, we'll talk about labels and text boxes. We'll show you how to get data from the user with text boxes. We'll teach you how to interact with the data that the user types in, so you can make your programs interactive.


We'll discuss basic debugging and what to do with syntax errors. We'll discuss string concatenation. We'll briefly discuss control arrays. We'll learn the Val function to convert text strings to number values.


We'll go over some real basic error handling to deal with errors in your code. We'll build a simple calculator program to add, subtract, multiply, and divide numbers.


No basic programming course would be complete without a discussion of the IF/THEN statement. We'll show you how conditional statements work. We'll learn how to exit a sub when needed. We'll show you how to properly indent (format) your code. And don't worry if you don't know what these terms mean right now - they're programmer terms, and we'll fully explain all of them to you as we're going along.


Finally, we'll show you how to compile your program into a standalone executable file that you can run outside of VB, and that you can put on a disk to share with others.


Again, this is the perfect beginner course for anyone who wants to learn VB. If you're not sure whether you can program - don't worry. We take you through all of the examples step by step. Even if you've been using VB for a while, you will benefit from the review, and you may even pick up a few useful tricks!


 Click here for the Teacher's Outline

Try a FREE Demo Lesson


Student Interaction: Visual Basic 101

Richard on 1/1/2007:  If you want to learn how to program in Visual Basic, this is the course for you. This course is designed for students who have never programmed before. However, even if you have been using Visual Basic for some time, you will benefit from the good, solid fundamentals that this course teaches - it's a great refresher for experienced developers as well. We have also had students come back and tell us that they picked up a few tips and tricks, even though they've been programming for years with Visual Basic. Programming basics, VB interface, forms, subroutines, MsgBox, command buttons, captions, build a calculator
Frank on 12/2/2007: is visual basic the same as visual c++ ?
Richard Rost on 12/9/2007: No. Visual Basic and Visual C++ are two totally different languages with completely different syntaxes.
Steve Guss on 12/15/2007: Is Your course valid for Visual Basic .NET?
Kenn Drescher on 12/20/2007: Very good. I've been puzzeled about the basic CODE. Really helps to finally grasp the nuts & bolts!
Richard Rost on 1/5/2008: Steve, this class is for Visual Basic 6.0. I am planning a separate course for VB.NET in the near future. If you're using VB.NET or VB 2005, you'll find that the majority of the CODE that I use is the same, but the program interface is a lot different.
  on 1/30/2008: how to make a database and to conect it,how to edit & delet..?

Richard Rost on 2/2/2008: We will be covering database connectivity in a future VB lesson - probably around 204/205. I haven't prepared the outline for it yet. 203 will likely cover more with reading and writing files. Then we'll go into databases.
Mel Flowers on 2/5/2008: Does your VB 6.0 prepare the student for Microsoft certification in Visual Basic? If so, how many of your courses in VB pretty much assures the student he'll pass the Prometric exam in Visual Basic?
Richard Rost on 2/5/2008: Mel, I honestly don't play the Certification game. I haven't looked at the Prometric exam, so I don't know what it involves. See my Blog Post for more on how I feel about Certifications.
Phil Gatchell on 3/21/2008: I can't find the Visal Basics on my computer? I searched and I don't have the program...
Richard Rost on 3/25/2008: Unless you've specifically purchased MICROSOFT VISUAL BASIC, it's not a program that comes with Windows or Microsoft Office. It's a totally separate program. If it's not on your computer and you HAVE purchased it, you might just need to reinstall it. Time to dig out those CDs.
Richard Ellsworth on 9/24/2008: All of a sudden you used msgbox with quotes. Where did that come from? Why the qoutes? You see i dont know the very basic syntax.

Richard Rost on 9/27/2008: If you're using MsgBox to display a word, such as "cat" then you put it in quotes:

MsgBox "Cat"

However, if you have a variable, let's say X, and you want to display the VALUE stored in that variable, you don't use quotes.

X = 5
MsgBox X

This should display a 5 in the box. If you were to say:

MsgBox "X"

Then you would just see X in the box. Get it?

 Lalith Abey on 11/4/2008: Hi Richard I have not done any programing in my life but I work in IT Teat area in admin work, I would like to start lerning VB useing your courses. Can you tell me that your course is a good place to start for a person who has not done any programing????
Richard Rost on 11/7/2008: Lalith, my VB101 course is the PERFECT place to start learning how to program - provided you have a copy of Visual Basic 6 to work with. If not, I'll be making some VB 2008 courses later this year that you can use with the new version of VB.
Lalith on 11/7/2008: Thank you for you reply, when new version of VB2008 available please let me know.Will this version work with VB Express 2008 version?
Tony Green on 11/10/2008: What is the difference between Visual Basic 6.0 and 2008.
Richard Rost on 11/10/2008: Yes, I will probably use the VB Express edition for the BEGINNER courses so that everyone can start off on the same page. With the advanced lessons, I'll move into the "full" version because there are some features that aren't included in the free one.
Richard Rost on 11/10/2008: There are a LOT of differences - too numerous to go into here. It's almost a completely different language now. The interface is completely different.
Daniel Weis on 11/27/2008: Richard:

You're an excellent instructor! I've tried several different avenues to learn VB and you make this material the most intuitive and easiest to understand.

I'm glad I bought the entire VB catalog from you guys!!



James Coker on 12/10/2008: Where can I purchase the latest version of Visual Basic. I use Windows Vista Ultimate and Microsoft Office 2007.
If I expect to get seriously into VBA programming do I need to have copy of the software that is a stand alone version? or can I use the VB code built into MS Office 2007?

chris flynn on 1/2/2009: does your excel course cover the VB developer and macros that have similar features as VB 6.0.
Richard Rost on 1/19/2009: You can find out more about the latest version of Visual Basic (which is part of Visual Studio) here on Microsoft's Site HERE. I am going to be upgrading my VB course to Visual Basic 2008 very soon. Yes, it is a standalone programming suite. VBA is something completely different and is part of Microsoft Office.
Richard Rost on 1/20/2009: Chris, my Visual Basic courses do NOT cover any Excel VBA. I will be covering Excel VBA in upcoming Advanced EXCEL courses.
 Tonya on 4/3/2009: How is VB different from VBA? Basically, will this course help me learn what is relevant for MS Access programming?
Richard Rost on 4/6/2009: VB is Visual Basic. It is a stand-alone application for designing your own programs.

VBA is Visual Basic for Applications. It is a version of the Visual Basic language that is used for enhancing Microsoft Office applications.

My VB courses cover JUST Visual Basic programming. While they will provide you with a good foundation of VB for use with other VB-related projects, you will not benefit from them unless you actually have the Visual Basic development program.

I do cover VBA for Microsoft Access in my Access classes, starting with Access 301.

Thomas Keilman on 4/12/2009: is there a mechanism to make the display go full screen?

can i use the windows media player to view lessons?

the text on the right side of this window is cut off or very nearly so.

michael  evans on 4/12/2009: Time Index 00:44......When I click on start on windows xp and then all programs , I dont have Microsoft Visual Basic 6.0 or the Visual Studio 6.0 Tools.
Richard Rost on 4/14/2009: Thomas, if you're using my Video Player software, click on the EXTERNAL checkbox and the videos will load in Windows Media Player. Or, if you know how, just open Windows Explorer and browse to the C:\Program Files\599CD folder and you'll find the WMV files there.
Richard Rost on 4/14/2009: Michael, you need to install either Visual Basic 6.0 or Visual Studio 6.0 software on your system in order to follow along with my tutorials. VB is a separate program suite that doesn't come with Windows.
 Mike on 4/18/2009: Hello,
Great Product!
Having trouble "Compiling" or creating an executable. Running Vista and not sure if I actually have the proper program loaded. Im accessing VB Editor through Excel, Tools, Macro, VB Editor. After creating and saving simple calculator, I click File . . . there is no "makeCalculator.exe" option. Does this have something to do w/ Vista or do I not have the full version of VB?
Thx in advance.

Richard Rost on 4/21/2009: Mike, if you're using Excel, you're not using the full Visual Basic or Visual Studio program. You're using EXCEL. See this page.
Sam Maldonado on 5/9/2009: I have been using VB 6.0 for sometime now. Starting to jump over to VB Express 5.0 and maybe even 8.0. My question is, using any of these two new versions of VB, can I still open, modify cells and close Excel files like I did in VB 6.0?
Richard Rost on 5/11/2009: Sam, to be completely honest, I personally haven't tried yet. I don't do a lot of automation of Excel from OUTSIDE of Excel (in VB). I would work from inside Excel using VBA.
 Neil Riley on 8/4/2009: Hi. Enjoyed your 101Vb class. However, I wasn't aware that vb was not the same as EXCEL 2003 VBA. Can I follow the rest of your vb classes using my 2003VBA program or do I have to buy a vb program? Also, if I learm vb will it help me program EXCELL spread sheets? Thank you. Neil
Richard Rost on 8/6/2009: Neil, my VISUAL BASIC classes are for the stand-alone VB 6.0 program which is for designing your OWN software. VBA is different. That's for automating Microsoft Office applications like Excel and Access.

Now, if you do take the time to learn VB, it will certainly help you when it comes time to use VBA. VBA is a superset of VB, so most of the techniques you learn in VB will apply to VBA.

I will be covering VBA for Excel 2007 very soon.

MUSTAFA BOUTELJA on 10/5/2009: Dear Richard ,I like very much your way of explaining so many programs and tutorials,I just want to thank you for all the effort you're making and believe me it's beautiful.Thanks
Mark Eslick on 10/12/2009: WOW I'm only half hour into this lesson and I'm aready starting to understand this however you are pulling these commands out from no where was hoping that there is a place that has them printed for refernce? with that said I bought this intro to help my son in his visual basic class. This class is right on the button. I'll be able to help thanks
Richard Rost on 10/13/2009: Mark, I'm glad you're enjoying the class. The material I use in my classes comes from MANY different reference books. Take your pick, there are hundreds of them. All of the material from this class IS available in printed form in the handbook you purchased.
abdul mikidadi on 11/26/2009: hi Richard, again great vidoes!! however my concern was to store data by using arrays rather than database, since its small amount of info, will array be capable of storing values like saving and retriving perhaps, if not what are the other options? thanks
Richard Rost on 12/13/2009: Arrays and databases are beyond this VB101 course, but for small amounts of data that you don't need to save permanently, you can use an array. I cover arrays in VB202. Beyond that, if you need to save the data, use a text file or a database.
Benjamin Berks on 5/10/2010: In VB101, lesson #4, it is suppost to display "Hello YourName" where YourName is called from the text box. I am using VB2008 Express Edition and the MsgBox command keeps putting the code as MsgBox(YourName) instead of MsgBox YourName. Anyway I keep getting a crash when it runs.

I know this training is for VB5&6, but wanted to see if you happen to know why I keep getting a crash?

Below is my actual code:

Public Class MyFirstProgram

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub ClickMeButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClickMeButton.Click


End Sub

Private Sub YourName_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles YourName.TextChanged

End Sub
End Class

Reply from Richard Rost:

Benjamin, I'm not sure. I don't even have VB2008 installed here right now, so I can't test it. I'll make your post public, however, in case one of the other students might have come across this. I plan to update all of my VB courses for the latest version this summer.

 Kris on 7/21/2010: Hello Richard,

I took your VB 101 class and wondered why this VB code I ran across on the internet doesn't have the same wording as the code shown in this class.
I was trying to find a code that would create a message box where you could enter a word and it would say it for you. I thought I could try to reconcile their VB code with what I learned in your class, but it did not have the same wording you used, like 'msgbox', 'Private sub', etc. Their code started the routine with 'Dim message' and had 'message=InputBox("Text","More Text")'. I was to paste the code into Notepad--it wasn't created in VB--is it a different VB language b/c it wasn't made in VB? Do you know the name of the code?

Thank you for your help. I enjoyed your class.

Reply from Richard Rost:

I'd have to see the code you're talking about, but VB6 (which is what I use) certainly supports the DIM and INPUTBOX commands.

Lou on 8/5/2010: Can you give me some article of visual basic when you first experience use it?what do you discover about vb and what is the difference of it to the other software like
Nicos Solomonides on 11/27/2010: I have bought a new PC with
Windows 7.Can I load the VB6 on?is it compatible?

Reply from Richard Rost:

According to Microsoft, it should work, but it's no longer supported. You should probably upgrade to Visual Studio 2010, which I'll be making courses for very soon.

 Orlando on 3/28/2011: Hi Richard,
Am I right in concluding that I can use these same VB commands in Excel Visual Basic Editor. I made a "hello world" button so it seems so...what limitations will I run into?

Thank you,

Reply from Richard Rost:

You can use MOST of the same commands from VB in Excel VBA. Excel has a whole set of its own commands and functions that you'll have to learn (how to move around, get the value from a cell, change formatting, etc.) but all of the standard VB commands you've learned (IF/Then, MsgBox, etc.) will still work just fine.

 Orlando on 3/29/2011: Hi Richard,
How can I view the button "Properties" when using Excel Visual Basic?

Thank you,

Reply from Richard Rost:

This course is for VB6, not Excel VBA. I'd need to know which version of Excel you're using, and what exactly you're trying to do. The two are COMPLETELY different.

 Johnson J. Kongor on 8/9/2011: Hi Gentlemen,
This is my very first time even viewing your tutorial to see how Visual Basic works. I have however been teaching / working with Microsoft Applicatiions Softwares(Word, Excel and Access) for the past six years with having this opportunity to learn a bite about Visual Basic until when i discovered your website through browsing. Thanks a lots for this introduction and i will highly appreciate learning from you if you can assure me the methods involve to order video CDs to learn most of your computer programs offline.

Alex Hedley on 8/9/2011: Hi Johnson,

You can order any of the courses online through the order page.

Once your order is processed you can download these videos to watch offline.

There is a tutorial on how to use the Amicron video player to watch the videos.

During the order process there is also an option to get the videos shipped on CD for an extra cost, just select that and you will have a backup copy.


A Lucas on 9/30/2011: Hi I have never known such a good teacher
Patrick Osi Isedu on 3/10/2012: I have just began the lessons. No questions yet.
Patrick Osi Isedu on 3/10/2012: I am using the Microsoft Visual Basic 2008 Express Edition. I have to program simple calculator as demonstrated by the lesson. I keep getting the error Message: Error in the build up .......

Reply from Richard Rost:

Patrick, my lessons are for Visual Basic 6.0. I'll be upgrading them to VB 2010 very soon (which is similar to 2008).

vb on 9/20/2012: hi richard, i would like to create a button and find the code to attached my email in outlook where i can specify the subject and to whom it will be sent and cc. thanks and more power.

Reply from Richard Rost:

This is a little more advanced. I haven't covered it in any of my VB courses, but I did cover sending email with Outlook in my Access 329 class using Access VBA. I believe the code work work in VB6.

However... I'm going to be making a seminar very soon on how to send email with VB using Outlook and using a NON-Outlook method. If you can wait a few weeks, the NON-Outlook method is MUCH better because it doesn't have to deal with that pesky Outlook security "feature" that prompts you "is this OK?" for each email you send.

freekmann1 on 9/25/2012: yes, you can load vb6 on window 7. writing new apps will work fine, but if you want to edit your already written vb6 apps; you will receive a message 'component not registered or something like that' with two option buttons, click continue loading till all the forms finish loading, now close your program, and choose don't save. restart windows and run your program again, WOW THERE YOU ARE EVERYTHING IS FINE, you can now edit, save, compile, upgrade or do what ever you want with VB6 SP6 on windows 7.
Vannak Hou on 12/5/2012: Richard, once I am done w/ the Visual Basic 6.0, will that help me to write VBA code for Access 2010 that I'm taking right now. I know if I want to go further into Access at a later point, looks to me that Visual Basic will help me out. Let me know. Thanks!

Reply from Richard Rost:

Learning the VB that I teach in my VB6 classes will help you learn the syntax of the language and a lot of the generic functions. My 300-level (Advanced) Access courses will then teach you how to use VB specific to Access.

vannak hou on 12/6/2012: So Basically, in order to get a better understanding of the VBA in Access Programming, basically is to take all your courses in Access. Right now, I'm reviewing all the videos that I have completed just to make sure I know what's going on before heading to next chapter but not to overwhelm myself. Thanks again.

Reply from Richard Rost:

Correct. You don't NEED any other VB courses if you follow my Access 300-level courses one after the other. I don't assume that you know anything other than what's covered in my previous Access courses.

Vannak on 12/6/2012: Thanks Richard! It's good to know that you will cover VB script in the 300. I am looking forward to be there once I'm done w/ each of the lessons.
Terrence Taylor on 12/14/2012: Hi Richard I just went through your VB101 by opening Visual Basic from my Excel 2007 program. I think I understand that Visual Basic is a standalone; will using the excel version limit me if i decide to move forward with more of your VB courses. Thanks

Reply from Richard Rost:

VB and VBA are completely different beasts. See this.

While you can learn the basics of how to program in VB/VBA with my VB101 course, if you don't have the VB6 programming language application on your system, you're going to have a hard time following along. I'll be updating my course for VB2012 soon, which is actually a FREE download from Microsoft (for the basic version).

Michelle C on 5/9/2013: Richard, are your VB classes valid for VBA for Access/Excel, etc.? I don't do any programming with Visual Basic, but I am interested in learning how to do more with Access and Excel.

Reply from Richard Rost:

My Visual Basic series is for VB 6.0 which is a standalone development environment. 99% of the LANGUAGE you learn in this class is valid for Access VBA however the technique of building apps in VB6 is a lot different. You would be better off getting my 300-level Access 2003 classes (or waiting for the Advanced and Developer series to come out later this summer) than getting the VB6 classes.

George on 10/11/2013: I wish to reply to Michelle C @ 5/9/2013:

If you want to do more with Access: You have to learn VBA ! Forget about Macros ! VBA can do all what Macros do,

Moreover, with macros the maintenance is very painful;
Moreover: in large companies, IT dpt do not accept Apps done with macros, only VBA !

If you learn Macros Access, you can only use what you learn in Access.

With VBA, you can use it with all MSoffice.
Please do believe me !

This is the reason I am learning VBA.

Geo on 10/11/2013: Dear All,

Let me share my experience with Video learning:

More than 10 years ago, I made a lot of Apps under Access 97; only with macros.

Now I have to use Access 2010 and I forgot a lot about macros and all the rest.
I want to be up and running as quickly as possible. I bot a few books . . . and realized it is too painful and slow; moreover I have neck problem.

Altough it is a bit more expensive with videos, I am now convinced it is the most efficient way to learn things.

The courses here are indeed excellent !
but I realized that if I want to take all of them related to Access it is going to cost me a buch of money ! For an old chap who was laid off one year ago, it is tough to cope with !

Geo on 10/11/2013: Hi Richard,

In your VBA courses, do you also talk about DAO and ActiveX Data Objects ADO ?

Best regards,

Reply from Richard Rost:

I cover DAO recordsets in my Access 320-329 series. I don't spend a ton of time on ADO, but I cover it a little. I cover it more in my ASP classes. I'll be covering both in the upcoming Developer series for Access.

Geo on 10/11/2013: Hi Richard,

I saw your description on the Web.
However, I did not find your background.

Teaching is indeed not given to everybody.
Teaching need a lot of empathy, patience and pedagogical methods.

Reply from Richard Rost:

You can find my bio here. I've been a computer nerd since a very young age. Started a PC sales & service business in 1994. Started teaching in my own classroom shortly after that. I had several years of classroom teaching experience under my belt before starting 599CD in 2002. I enjoyed the face-to-face interactions, but I LOVE what I do now more because I can teach MANY more people with videos. I love hearing from people all over the world who learn with my videos.

Deon on 10/14/2013: Hi Geo,

I would like to believe I speak on behalf of all Richard's students worldwide. Richard, indeed, possesses all the qualities you mentioned above; which are EMPATHY, PATIENCE AND PEDAGOGICAL METHODS. His pedagogical methodology is Educational, Academic, Instructive, Didactic, Tutorial, Informative, Instructional, Teaching Scholastic Dicipline and much more, truly. His use of Lund's Laws of Primacy and Recency shine through everytime. Over 30-thousand students world-wide means Richard is doing somthing correctly, wouldn't you say. Forget the background thing - it's not important. What is important is that you subscribe, immediately, to the best teaching website and teacher on the planet!

Richard, I hope you don't mind this 'un-ashamed plug'on your behalf :)!

Geo - enjoy your day and kindest regards,


Reply from Richard Rost:

Gee, thanks Deon. Now my head is REALLY inflated. :)


You may want to read these articles from the 599CD News:


Visual Basicindex
Account Login
Online Theater
Lost Password
Free Upgrades
Insider Circle
Student Databases
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search Our Site
Waiting List
Production Schedule
Collapse Menus
Live Chat
Customer Support
WalkThru Tutorials
Consulting Services
About Us
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Gift CDs
Live Chat
General Info
Support Policy
Contact Form
Email Us
Mailing Address
Phone Number
Fax Number
Course Survey
Facebook    Twitter

Google Plus    LinkedIn

Blog RSS Feed    YouTube Channel
Richard Rost Microsoft MVP