Visual Basic (VB) Solved MCQs

1.

____ icon is not available on a toolbox.

A. form
B. label
C. text box
D. check box
Answer» A. form
2.

Remark statement starts with _____

A. *
B. /
C. `
D. /*
Answer» C. `
3.

Object name can be maximum of _____ characters.

A. 255
B. 30
C. 40
D. 256
Answer» C. 40
4.

Prefix used for a Check box is _____

A. chk
B. che
C. chc
D. chb
Answer» A. chk
5.

Prefix used for a Command Button is _____

A. com
B. cob
C. cmm
D. cmd
Answer» D. cmd
6.

Prefix used for a Form is _____

A. for
B. frm
C. fra
D. fom
Answer» B. frm
7.

Prefix used for a Frame is _____

A. fra
B. frm
C. fre
D. fam
Answer» A. fra
8.

Prefix used for a Text Box is _____

A. txt
B. tex
C. teb
D. tbo
Answer» A. txt
9.

Which of the following is not a valid property of a Form?

A. name
B. caption
C. text
D. forecolor
Answer» C. text
10.

Which of the following is not a valid property of a Label?

A. name
B. caption
C. text
D. forecolor
Answer» C. text
11.

Which of the following is not a valid property of a Text Box?

A. name
B. caption
C. text
D. forecolor
Answer» B. caption
12.

of the following is not a valid property of a Command Button?

A. name
B. caption
C. text
D. forecolor
Answer» C. text
13.

Which of the following is not a valid property of a Check Box?

A. name
B. caption
C. text
D. enabled
Answer» C. text
14.

Which of the following is not a valid property of an Option Button?

A. name
B. caption
C. text
D. enabled
Answer» C. text
15.

Which of the following is not a valid property of a Command Button?

A. default
B. caption
C. text
D. cancel
Answer» C. text
16.

If ______ property of a Command button is set to True then by pressing ‘Esc’ key from the keyboard the Command get selected automatically

A. default
B. caption
C. cancel
D. tabindex
Answer» C. cancel
17.

If ______ property of a Command button is set to True then by pressing ‘Enter’ key from the keyboard the Command get selected automatically

A. default
B. caption
C. cancel
D. tabindex
Answer» A. default
18.

______ property determines whether the focus stops on a control when a Tab key is pressed.

A. default
B. tabstop
C. cancel
D. tabindex
Answer» B. tabstop
19.

______ property determines the order of the focus to move as the Tab key is pressed.

A. default
B. tabstop
C. cancel
D. tabindex
Answer» D. tabindex
20.

To define access key, ___ symbol is used before the character you want as access key while setting caption property of a Command Button.

A. $
B. %
C. ^
D. &
Answer» D. &
21.

Which arithmetic operator is used for integer division.

A. /
B. \\
C. %
D.
Answer» B. \\
22.

Which arithmetic operator is used for exponentiation.

A. /
B. \\
C. %
D. ^
Answer» D. ^
23.

What is the result of VAL(“1,234”)?

A. 1
B. 0
C. 1234
D. 123
Answer» A. 1
24.

What is the result of VAL(“1234”)?

A. 1
B. 0
C. 123
D. 1234
Answer» D. 1234
25.

What is the result of VAL(“A123”)?

A. 1
B. 0
C. 1234
D. 123
Answer» B. 0
26.

What is the result of VAL(“15/08/2020”)?

A. 15
B. 15/08
C. 0
D. 15/08/2020
Answer» A. 15
27.

Which of the following is an invalid Data Type in VB?

A. integer
B. string
C. single
D. smallint
Answer» D. smallint
28.

vbRed is ____ .

A. vb colour
B. vb color
C. colour
D. intrinsic constant
Answer» D. intrinsic constant
29.

Which of the following is not a valid logical operator in VB.

A. and
B. or
C. xor
D. not
Answer» C. xor
30.

______ control can be used to accept input from the user.

A. label
B. form
C. text box
D. frame
Answer» C. text box
31.

Which of the following is a non-executable statement in VB?

A. if
B. dim
C. assignment statement
D. do… while
Answer» B. dim
32.

The constant which are readymade in VB are called as _______ constant.

A. numeric
B. string
C. named
D. intrinsic
Answer» D. intrinsic
33.

The constant which are defined by user is known as _____ constant.

A. numeric
B. string
C. named
D. intrinsic
Answer» C. named
34.

Which of the following function is invalid in VB?

A. left( )
B. lower( )
C. mid( )
D. len( )
Answer» B. lower( )
35.

____ function is used to convert a text value to a numeric value.

A. ucase( )
B. lcase( )
C. val( )
D. len( )
Answer» C. val( )
36.

Option buttons are also called as _______ buttons.

A. check
B. radio
C. round
D. select
Answer» B. radio
37.

_____ can be used in an application to give user True/False or Yes/No Option

A. option button
B. check box
C. text box
D. label
Answer» B. check box
38.

_____ allows the user to select any number of options at a time from a group.

A. option button
B. check box
C. text box
D. label
Answer» B. check box
39.

_____ is used to display headings and messages.

A. option button
B. check box
C. text box
D. label
Answer» D. label
40.

_______ property of a Text Box is True then user cannot type anything in a Text Box.

A. text
B. locked
C. name
D. backcolor
Answer» B. locked
41.

_______ statement cannot be used to create a loop.

A. do – while
B. for – next
C. while – wend
D. if – else
Answer» D. if – else
42.

For I = 10 To 20 …. Next I, will execute a loop _____ time/s.

A. 10
B. 11
C. 0
D. 1
Answer» B. 11
43.

For I = 1 To 20 Step 2…. Next I, will execute a loop _____ time/s.

A. 10
B. 20
C. 0
D. 1
Answer» A. 10
44.

For I = 10 To 1…. Next I, will execute a loop _____ time/s.

A. 10
B. 20
C. 0
D. 1
Answer» C. 0
45.

For I = 10 To 1 Step -1…. Next I, will execute a loop _____ time/s.

A. 10
B. 20
C. 0
D. 1
Answer» A. 10
Tags
  • Question and answers in Visual Basic (VB),
  • Visual Basic (VB) multiple choice questions and answers,
  • Visual Basic (VB) Important MCQs,
  • Solved MCQs for Visual Basic (VB),
  • Visual Basic (VB) MCQs with answers PDF download