Classic Visual Basic (VB) is a programming language and integrated development environment (IDE) developed by Microsoft. It was widely used during the late 1990s and early 2000s to build Windows applications and has played a crucial role in the development of various desktop software.
Pro Tip
Want to assess your learners online? Create an online quiz for free!
Article overview
- Part 1: 30 Classic Visual Basic quiz questions & answers
- Part 2: Download Classic Visual Basic questions & answers for free
- Part 3: Free online quiz software – OnlineExamMaker
Part 1: 30 Classic Visual Basic quiz questions & answers
1. What does VB stand for in Classic Visual Basic?
a) Visual Base
b) Visual Basic
c) Virtual Basic
d) Virtual Base
Answer: b) Visual Basic
2. Which version of Visual Basic introduced support for 32-bit Windows operating systems?
a) VB 1.0
b) VB 3.0
c) VB 5.0
d) VB 6.0
Answer: d) VB 6.0
3. In Classic VB, what is the purpose of the “Option Explicit” statement at the beginning of a code module?
a) Enables the use of explicit casting
b) Enforces the declaration of all variables before use
c) Activates advanced debugging features
d) Disables implicit data type conversions
Answer: b) Enforces the declaration of all variables before use
4. Which control is used to display a list of options that the user can choose from?
a) TextBox
b) ComboBox
c) CheckBox
d) OptionButton
Answer: b) ComboBox
5. Which keyword is used to create a new instance of an object in Classic VB?
a) New
b) Create
c) Object
d) Instantiate
Answer: a) New
6. What event is commonly used to initialize the properties of controls when a form loads?
a) Form_Load
b) Form_Initialize
c) Form_Start
d) Form_Open
Answer: a) Form_Load
7. Which property of a control determines its position on a form in Classic VB?
a) Location
b) Position
c) TopLeft
d) Left
Answer: d) Left
8. How can you add a comment in Classic VB code?
a) // This is a comment
b) # This is a comment
c) ‘ This is a comment
d)
Answer: c) ‘ This is a comment
9. Which menu item in the VB IDE is used to add a new form to the project?
a) Insert
b) Edit
c) View
d) Project
Answer: d) Project
10. Which control is used to display a message to the user and request a simple response in Classic VB?
a) MessageBox
b) DialogBox
c) InputBox
d) MsgBox
Answer: d) MsgBox
11. Which function is used to convert a string to an integer in Classic VB?
a) StrToInt
b) ToInt
c) Int
d) CInt
Answer: d) CInt
12. What is the file extension used for Classic VB project files?
a) .vbproj
b) .vbp
c) .vb
d) .proj
Answer: b) .vbp
13. Which keyword is used to exit a loop prematurely in Classic VB?
a) Return
b) Break
c) Exit
d) End
Answer: c) Exit
14. In Classic VB, which collection is used to store key-value pairs?
a) Set
b) Dictionary
c) HashTable
d) KeyValuePair
Answer: b) Dictionary
15. Which event is triggered when a user clicks on a command button in Classic VB?
a) Click
b) MouseClick
c) ButtonClick
d) Command
Answer: a) Click
Part 2: Download Classic VB questions & answers for free
Download questions & answers for free
16. Which data type is used to store single-precision floating-point numbers in Classic VB?
a) Float
b) Decimal
c) Double
d) Single
Answer: d) Single
17. Which function is used to convert an expression to a string in Classic VB?
a) ToString()
b) Convert.ToString()
c) CStr()
d) Str()
Answer: c) CStr()
18. What is the maximum number of characters that a variable name can have in Classic VB?
a) 64
b) 128
c) 256
d) 1024
Answer: c) 256
19. Which property is used to set the title of a form in Classic VB?
a) FormTitle
b) Title
c) Caption
d) Text
Answer: d) Text
20. Which control is used to display a continuous range of values with a sliding thumb in Classic VB?
a) Slider
b) ScrollBar
c) TrackBar
d) ProgressBar
Answer: c) TrackBar
21. Which keyword is used to declare a variable that can be accessed by all procedures within a module in Classic VB?
a) Global
b) Private
c) Public
d) Shared
Answer: c) Public
22. What is the default scope of a variable declared within a procedure in Classic VB?
a) Global
b) Public
c) Private
d) Local
Answer: d) Local
23. Which method is used to close a form in Classic VB?
a) End
b) Close
c) Exit
d) Terminate
Answer: b) Close
24. In Classic VB, what is the maximum number of characters that a TextBox control can display?
a) 256
b) 512
c) 1024
d) It varies depending on the operating system.
Answer: d) It varies depending on the operating system.
25. Which property is used to get or set the selected item in a ListBox control in Classic VB?
a) SelectedIndex
b) SelectedItem
c) SelectedText
d) Value
Answer: a) SelectedIndex
26. Which keyword is used to create a constant in Classic VB?
a) Const
b) Final
c) Readonly
d) Constant
Answer: a) Const
27. Which control is used to display a date and time picker in Classic VB?
a) DateTimePicker
b) DatePicker
c) TimePicker
d) DateAndTime
Answer: a) DateTimePicker
Just so you know
With OnlineExamMaker quiz software, anyone can create & share professional online assessments easily.
28. In Classic VB, which function is used to determine whether a file exists?
a) File.Exists()
b) FileExists()
c) FileExist()
d) File.Exists
Answer: a) File.Exists()
29. What is the purpose of the “Unload” statement in Classic VB?
a) To free up memory used by an object
b) To close an open file
c) To remove a control from a form
d) To close a form
Answer: d) To close a form
30. Which method is used to display a context-sensitive help window in Classic VB?
a) ShowHelp()
b) DisplayHelp()
c) Help.Show()
d) ShowContextHelp()
Answer: c) Help.Show()
Part 3: Best online quiz making platform – OnlineExamMaker
OnlineExamMaker’s secure, powerful web-based quiz maker is an easy-to-use, intelligent online testing software tool for business, training & educational to create exams & quizzes with ease. With its user friendly interface and extensive range of features, OnlineExamMaker simplifies the process of creation and distributing online quizzes to engage learners, improve knowledge retention, and assess performance.
Create Your Next Quiz/Exam with OnlineExamMaker