Sample Multiple Choice Test Questions for Visual Basic Programming.
2-23. In txtName.Text
Answer: A. the property is txtName.
B. the property is Text.
C. the object is Text.
D. Both answers a and c are correct.
2-24. You are designing a form and it will be necessary for the user to type in their name.
Answer: You should use a _____________ for inputting the user’s name.
A. text box
C. command button
D. check box
2-25. A hair styling salon needs help designing a form for the various services that they
Answer: offer. What would you suggest they use that will display all of the services, and will
allow customers to choose one or more items?
A. check boxes
B. text boxes
C. option buttons
D. name boxes
2-26. In order to make a picture expand to fill an image control you must
Answer: A. set the Stretch property to .
B. set the Visible property to .
C. set the Stretch property to .
D. set the Visible property to .
3-18. When you declare a variable or a named constant, Visual Basic reserves an area of
Answer: memory and assigns it a name called an
3-19. Which of the following is not a valid rule for identifiers?
Answer: A. Names may contain underscores.
B. Names may contain letters.
C. Names may contain digits.
D. Names may contain spaces.
3-20. The statement to declare a local variable called Index that will store whole numbers
A. Dim whlIndex as Whole
B. Dim strIndex as String
C. Dim Integer as intIndex
D. Dim intIndex as Integer
3-21. The reserved Visual Basic word Dim is short for dimension, which means
Answer: A. declaration.
C. storage location.
4-16. In flowcharting, the symbol that is used for decisions is a
Answer: A. diamond.
4-17. Which of the following is a relational operator?
Answer: A. And
4-18. With the logical operator _______ , both conditions must be for the entire condition
Answer: to evaluate .
4-19. You can use the set of instructions in another event if you ________ the other
A. declare the variables in
B. force a break in
C. use Option Explicit in
5-15. The prefix for naming a menu item is ________
Answer: A. m
5-16. Which of the following is the correct way to assign a font to a label using common
Answer: dialog boxes.
A. lblEmployee.Font.Name = dlgCommon.FontName
B. dlgCommon.FontName = lblEmployee.Font.Name
C. lblEmployee.Font.Name dlgCommon.Font.Name
D. dlgCommon.Font.Name = lblEmployee.Font.Name
5-17. Common Dialog Boxes
Answer: A. allow Visual Basic programs to translate the text on the screen into another
B. display the predefined Windows dialog boxes for print, open, save, fonts, and
C. can only be used on forms with menus.
D. allow you to create message boxes that will pop up and prompt the user for