Home

1000+ Visual Basic Multiple Choice Question Answer [Solved]

Thursday 9th of March 2023

Sharing is caring

1. Instr$(text1.text,"visual") will returns :
A. No. of times the string "visual" is present in the string in text1.text.
B. It puts the control where it finds the text "visual" in the string given in text1.text.
C. First occurrence of the text "visual" within the string given in text1.text
D. None of the above.
Answer : C
2. CommonDialog control is the default control that anyone can find in the toolbar when a new project is started
A. True
B. False
C.
D.
Answer : B
3. To break a loop abnormally when satisfying a condition, we can use
A. Break statement
B. Exit statement
C. Both i & ii could be used.
D. None of the above.
Answer : B
4. In visual basic the default unit is :
A. centimeter.
B. Inch.
C. Dpi.
D. Twips .
Answer : D
5. In visual basic 'Break' statement could be used along with "Select Case"
A. True
B. False
C.
D.
Answer : B
6. IsDate() function returns true if its argument is a valid date and time
A. True
B. False
C.
D.
Answer : B
7. If the Flag constant for the font common dialog box is cdlCFPrinterFonts then it causes the dialog box to show only the fonts supports by the printer specified by the hdc property
A. True
B. False
C.
D.
Answer : A
8. _____________ property of any control cannot change at run time.
A. color
B. name
C. caption
D.
Answer : B
9. To run an application you have to press :
A. F3
B. F6
C. F5
D. F7
Answer : C
10. Which property of list box control reports the number of selected items.
A. ListIndex
B. Selected
C. Selcount
D. NewIndex
Answer : C
11. In visual basic Bool variable stores
A. 2 bytes
B. 1 bytes
C. 4 bytes
D. none of the above.
Answer : D
12. The amount of text any one can place in text box is maximum 64 kb.
A. True
B. False
C.
D.
Answer : A
13. The extension name of a Visual Basic form is _____________.
A. .frm
B. .txt
C. .prj
D. .vbp
Answer : A
14. It is possible to pass different number parameters to a function when call the function on different time.
A. To do this one can use in the parameter list of that function
B. paramarray keyword with the array declaration
C. argument should be passed as array
D. none of the above
Answer : B
15. In database application, any field does not contain any values can be recognized by:
A. Nothing value.
B. Null value.
C. Error value.
D. Empty value.
Answer : B
16. You can get the ASCII value of any character or number by using
A. ASC() function
B. ASCII() function
C. There is no function to get the ascii value.
D.
Answer : A
17. Suppose there is a data control named data1. What will be the effect if the following code is inserted
A. Data1.recordset.movefirst
B. The record pointer will move to the first record of the record set
C. The pointer will move to the first record of the original table that contains the data
D. It will refresh the recordset
Answer : B
18. Isnull(), IsEmpty() determines weather any variable has been initialize or not
A. True
B. False
C.
D.
Answer : A
19. If the user wants to select the multiple files from file open and filesave dialog boxes then the flag must be set to
A. cdlOFNMultiselsectAllow
B. cdlOFNAllowMultiselect
C. It is not possible to select more than one file at a time
D. None
Answer : B
20. It is possible to build an application without using any form:
A. True
B. False
C.
D.
Answer : A
21. In _______________ control you can get only drop-down list of the content but cannot add directly anything to that control.
A. text box
B. combo box
C. List Box Control
D.
Answer : C
22. In a programme body :
Private sub form_load()
X=inputbox("First No. :")
Y=inputbox("Second No. :")
Z=val(X) +val(Y)
Print Z
End sub
What will be the output ?

A. The summation of two numbers given in two input box
B. It will show the numbers given in the input box side by side
C. It will show nothing
D. None of the above
Answer : C
23. In case of visual basic, IDE means :
A. Internal Database Engineering.
B. Integrated Database Environment.
C. Integrated Development Environment.
D.
Answer : C
24. It is possible to access a menu without using mouse, to access the menu ;pressing the Ctrl key and the letter assigned to access the menu
A. True
B. False
C.
D.
Answer : B
25. Min and Max property can be used with Font common dialog box to determine
A. To controlling dialog box size
B. The minimum and maximum size displayed in the size list
C. None of the above
D.
Answer : B
26. CommonDialog1.ShowOpen
Filename1=CommonDialog1.Filename
The above code will

A. Set the filename1 by the selected filename from the common dialog contol.
B. First displays the open dialog box and let the user select any file from any
C. location and then set the filename1 by the selected filename.
D. Both are true.
Answer : B
27. The fundamental property of RichTextBox control is
A. Text property
B. TextRTF property
C. RTFText property
D. All of the above
Answer : C
28. Through which property of option button control one can change the font color of the caption.
A. Back color
B. Font color
C. Fore color
D. None
Answer : C
29. It is possible in visual basic to specifying array limit like from 1 to 10
A. True
B. False
C.
D.
Answer : A
30. It is possible to change the shortcut key assigned to any menu for accessing within the menu editor.
A. True
B. False
C.
D.
Answer : B
31. Flag property is used to adjust the function of each common dialog box
A. True
B. False
C.
D.
Answer : A
32. Visual Basic produce:
A. 3 types of executable code.
B. 2 types of executable code.
C. 4 types of executable code
D. none of the above.
Answer : B
33. The full form of IIS is :
A. Indian Institute of Science.
B. Internet Information Service
C. Industrial Information Services.
D.
Answer : B
34. which control structure are working under false condition
A. do-while loop & do loop-while
B. while-wend & for loop
C. do-while loop & while wend loop
D. do-until loop & do loop-until
Answer : D
35. What is the default value for multi-select property of list box control.
A. 1
B. 2
C. 0
D. none
Answer : C
36. In visual basic, number of loop control structure is _____________.
A. 4
B. 5
C. 6
D. 7
Answer : C
37. It is possible to change the password character property of text box control at run time.
A. True
B. False
C.
D.
Answer : B
38. In a text box control the default caption for text box is text1.
A. True
B. False
C.
D.
Answer : B
39. what will be the output of the code below :
private sub command_click()
dim I as integer
I=0
Do
Print I
Loop until I>10
End sub

A. it will generate compile time error
B. it will generate runtime error
C. it is an endless loop
D. 0 1 2 3 4 5 6 7 8 9 10
Answer : C
40. To enable apply button in dialog box ; flag value should be set to
A. cdlCFApply
B. cdlcfTTOnly
C. cdcclHelpButton
D. None of the above
Answer : A
41. when using 'do until-loop' statement as stated below
I=10
Do until I>5
Print I
I=I+1
Loop
This statement will print

A. it will generate a run time error
B. no output will be shown
C. 10 11 12 13 14 15
D. none of the above
Answer : B
42. The other Single Document Interface forms are by default child of MDI form when MDI form is inserted.
A. True
B. False
C.
D.
Answer : B
43. Visual Basic has ____________ number of editions
A. 3
B. 4
C. 5
D. 6
Answer : A
44. Now() function will return the current drive and directory you are working on as return value.
A. True
B. False
C.
D.
Answer : B
45. It is possible to load a MDI form without any childform.
A. True
B. False
C.
D.
Answer : A
46. Dialog title property is used to change the title of any dialog box
A. True
B. False
C.
D.
Answer : A
47. If you want a list box control with check box option, which property of list box control you will have to change.
A. Check box property
B. Check style property
C. Style property
D. None
Answer : C
48. Function Add(Num1 as integer, Num2 as integer) as integer
Add=Num1+Num2
Num1=0
Num2=0
End function
This body is an example of calling up a function by:

A. By optional argument.
B. By value.
C. By reference.
D.
Answer : C
49. Delete method of the recordset of Data Control or Data Access Object is delete the record which is pointed out by the record pointer.
A. True
B. False
C.
D.
Answer : A
50. When someone uses the code like list1.list(1); then it will return the first item of the list box control.
A. True
B. False
C.
D.
Answer : B

Sharing is caring