CONGRATULATIONS!!!    YOU    ARE    ON    YOUR    WAY    TO    BECOMING    A    VERY,    VERY    HIGHLY    PAID    VB    PROGRAMMER


OBJECTIVES

This lesson will focus on the programming building blocks of Visual Basic. Just like any other programming language, VB uses programming building blocks such as procedures, functions, "If" statements, "Do" loops, variables, and other important programming language concepts.

Programming Building Blocks

1.  What is wrong with the following statement?
    If B=3
       B=2
    End If

2.  Suppose that currently the variable MyVariable is equal to 3.  What will be the contents of the lblMyLabel label after the following code is executed:

     Select Case MyVariable
          
          Case 0
               lblMyLabel.Caption = "Hi, Have a nice day"

          Case 1
               lblMyLabel.Caption = " "

          Case 2
               lblMyLabel.Caption = "Are you having fun?"

          Case 3 
               lblMyLabel.Caption = "Good-bye"

          Case 4
               lblMyLabel.Caption = "Good Morning"

     End  Select


TEST YOUR PROGRESS

ANSWER KEY:

BACK TO HOMEPAGE

VB ONLINE: