Try to answer these 100+ Visual Basic MCQs and check your understanding of the Visual Basic subject.
Scroll down and let's begin!
A. variables
B. events
C. conditionals
D. operators
A. All of these are correct
B. wscript file_name.vbs
C. cscript file_name.vbs
D. Pressing enter after you write: file_name.vbs
A. VB.NET
B. Visual Studio
C. Visual C++
D. C++
A. arithmetic, relational, and logical
B. plus, minus, multiply
C. divide, multiply, plus
D. add, divide, multiply
A. Develop Windows applications
B. Create executable files (EXE files)
C. All are correct
D. Create DLL files
E. Create ActiveX controls
A. True
B. False
A. deleting
B. decompiling
C. compiling
D. coding
A. format the border of the image
B. change the color of the image
C. delete an existing picture
D. populate the picture with an image from a specified directory
A. False
B. True
A. "
B. #
C. +
D. -
E. '
A. Dim
B. Loop
C. Declare
D. Private Sub
A. Clear
B. Cancel
C. Exit Do
D. Delete Loop
A. listbox.setnewitem = item
B. listbox.newitem.add(item)
C. listbox.items.item(item).register
D. listbox.items.add(item)
E. listbox.itemmenu.add(item)
A. .vbo
B. .mvb
C. .frm
D. .vbp
A. All of these
B. Dim (Variable) AS (Datatype)
C. Declare @(Variable) (Datatype)
D. (Datatype) (Variable);
A. Stop
B. End
C. End Sub
D. Stop Procedure
E. Ending
A. F5
B. F4
C. F7
D. F6
A. Label
B. Textbox
C. Checkbox
D. All of these
A. event
B. assembly
C. adjective
D. asp
A. For
B. Begin
C. Start
D. Sub
E. With
A. C++
B. BASIC
C. Qbasic
D. Assembly
A. .exe
B. .vb
C. .vbp
D. .html
A. none of these
B. sub
C. procedure
D. function
A. */
B. @
C. '
D. %
E. %%
A. visible
B. appear
C. display
D. show
A. document
B. form explorer
C. project explorer
D. code window
A. C++
B. network oriented clients
C. file sharing
D. decompiling
A. variable
B. data type
C. number
D. procedure
A. high level
B. mid-level
C. assembly level
D. low level
A. Relational
B. Boolean
C. Arithmetic
D. Concatenation
A. Messaging Application Programming Interfere
B. Messaging Application Programming Interface
C. None of the Above
D. Messaging Administration Programming Interface
E. Messaging Application Programming Interchange
A. No
B. Yes
C. You can read but cannot write
A. Application.ScreenUpdating = True
B. Application.ScreenUpdating = False
C. Application.Visible = True
D. Application.DisplayAlerts = False
E. Application.Visible = False
A. 6
B. True
C. False
D. 2
E. 3
A. ActiveWindow.Zoom = 80
B. ActiveWindow.Zoom = -20
C. ActiveWindow.Zoom.Adjust = 80
D. Application.Zoom = 80
E. Zoom = 80
A. Standard EXE
B. Native DLL
C. ActiveX EXE
D. ActiveX Control
E. ActiveX DLL
A. Microsoft Data Interface
B. Multiple Data Interface
C. Multiple Document Interface
D. Microsoft Document Interface
A. Done
B. Next
C. End
D. End Loop
E. End For
A. 1
B. Determined by a compiler switch
C. Default is 0. Can be set to 1 by "Option Base 1"
D. 0
E. Default is 1. Can be set to 0 by "Option Base 0"
A. LockPessimistic Locks the row automatically. LockOptimistic Locks the only when initiated by code.
B. There is no difference
C. LockPessimistic Locks the row once after any edits occur. LockOptimistic Locks the row only when Update is called.
D. LockPessimistic Locks the row only when Update is called. LockOptimistic Locks the row once after any edits occur.
A. Public External Sub RtlMoveMemory Lib "Kernel32" (lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)
B. Import Function "RtlModelMemory" Alias "CopyMemory" From "Kernel32" ([Pointer] lpvDest As Any, [Pointer] lpvSource As Any, ByVal cbCopy As Long)
C. Import Function "RtlModelMemory" As "CopyMemory" From "Kernel32" (lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)
D. DllImport Sub CopyMemory From "Kernel32" Original "RtlMoveMemory" (lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)
E. Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)
A. All variables must be declared before use. Their type is not required.
B. variables are defined automatically
C. All variables with their types must be declared before use.
D. Options for all built in controls is restricted.
A. 1024
B. 512
C. 2048
D. 256
E. 780
A. x as variant and y as integer
B. Both are integers
C. Wrong declaration
A. 1 - CenterOwner
B. 0 - Manual
C. 3 - Windows Default
D. 2 - CenterScreen
E. 4 - Automatic
A. False
B. True
A. "Compile to Native Code" and enable "Create Symbolic Debug Info"
B. select "Start with Full Compile" from "Run" menu
C. add "NATIVE=1:DEBUG=1" to "Conditional Compilation Arguments"
D. "Compile to P-Code" and enable "Create Symbolic Debug Info"
E. Attach to VB6.exe from Visual Studio
A. Using Windows API
B. By Setting ControlBox Property to False or by using Windows API
C. By Setting ControlBox Property to True
D. By Setting ControlBox Property to False
E. By Passing parameter FALSE to Forms SHOW Method
A. StandardColor
B. StandardPicture
C. StandardLayout
D. StandardFont
E. StandardDataFormat
A. Decorate it with "<Default>" attribute
B. You can not
C. Rename your property to "Default"
D. Using "Option Default Property 'propertyname'" in "General Declarations" section
E. Set "Procedure ID" property of property to "(Default)" in "Procedure Attributes" dialog
A. TransactionSucess and TransactionFail
B. ObjTransOk and ObjTransFail
C. SetComplete and SetAbort.
D. ObjectComplete and SetObject
A. Dim s:=2
B. Dim s : s=2
C. Dim s=2
D. Dim s:2
A. Columns("L:X").Width= 30
B. Select("L:L,X:X").ColumnWidth= 30
C. Range("L:X").ColumnWidth= 30
D. Range("L:L,X:X").ColumnWidth= 30
E. Columns("L:L,X:X").Width= 30
A. ActiveWindow.Cells.Rows.AutoFit
B. Cells.EntireRow.AutoFit
C. ActiveWorkbook.EntireRow.AutoFit
D. ActiveWorkbook.Rows.AutoFit
E. Rows.AutoFit
A. Timer Control
B. Another UserControl
C. OLE Control
D. An OCX Control
A. Assume No Aliasing
B. Interface Forwarding
C. COM Compatibility
D. Retained in Memory
E. Out of Process Library
A. Options
B. Source
C. UserID
D. Connection String
E. Password
A. Set Opacity to 0
B. Set BackColor to Transparent
C. Add WindowStyle VB_TRANSPARENT
D. Set Transparent to True
E. Set BackStyle to Transparent
A. command
B. executable
C. function
D. procedure
A. Align Property
B. AutoRedraw Property
C. DrawMode Property
D. IsParent Property
E. IsChild Property
A. 1 byte
B. 0
C. 1
D. -1
A. VBFormMDI6
B. ThunderMDIForm
C. VBFormMDI
D. ThunderMDI6Form
E. VB6MDIForm
A. DllSelfRegister
B. regserver
C. regsvr32
D. regsvr64
E. register
A. Freeze Column A
B. Freeze Panes will not work with that range selected
C. Freeze Row 1
D. Remove current Freeze Panes settings
E. Freeze Column A & Row 2
A. text.selbold=true
B. select.bold=true
C. .bold=true
D. .SelBold=true
E. text.bold=true
A. 128 seconds
B. 60 seconds
C. 1.4 seconds
D. 10 seconds
E. 65.5 seconds
A. for i=1 to ListView1.ListItems.Count
B. for i=0 to ListView1.ListItems.Count - 1
C. for i=0 to ListView1.ListItems.Count
A. No
B. No, but use workarounds such as: GetQueueStatus or GetInputState APIs
C. Use a timer instead of loop
D. No, but use workarounds such as: Timer, GetTickCount API
E. Yes
A. Run
B. Compile
C. Build
D. Executable
A. Property
B. Class
C. Control
A. Font
B. Format
C. Solution
D. Text
A. title bar
B. library
C. controls
D. logical
A. All the three choices here. (is declared inside a class but outside any procedure, is accessible to all procedures in a class, is visible to all statements inside the class)
B. Assigning the predefined constant String.Empty to the text property
C. Both a date and a time
D. No value is returned. A runtime error is generated
A. Caption
B. Values
C. Label
D. Text
A. Private
B. Access
C. Global
D. Universal
A. Cannot accept any
B. Can accept two
C. Can accept one
D. Can accept any number
A. Concatenation
B. Relational
C. ToLower
D. Decision
A. Braces
B. Brackets
C. Parentheses
D. Quotation marks
A. Static
B. Noninteractive
C. Dynamic
D. Parallel
A. Concatenation
B. Relational
C. Decision
D. Boolean
A. From
B. To
C. Is
D. Range
A. Var
B. Decl
C. Declare
D. Dim
A. Comment
B. A blue squiggly line
C. Equal sign (=)
D. Error List
A. Color
B. Font
C. ForeColor
D. TextColor
A. RadioButton
B. Seven
C. Nested selection structure
D. End Select
A. Const
B. Comment
C. Input
D. Controls
A. Private
B. Dim
C. Mod
D. Static
A. Declare variables for all of the input data
B. Advance the insertion point to the next line in a control
C. Decimal.TryParse(txtLateFee.Text, decLateFee)
D. The keyword Nothing (no data at all
A. Keyword Assign
B. Ampersand (&)
C. Equal sign (=)
D. Keyword Set
A. WriteLine
B. IndexOf
C. BindingSource
D. PadRight
A. Use case
B. Syntax
C. Label
D. Toolbox
A. False
B. Counter
C. Scope
D. True
A. Range
B. Scale
C. Lifetime
D. Scope
A. AlignText
B. Alignment
C. TextAlign
D. Justify
A. LinkLabel
B. StatusStrip
C. ErrorProvider
D. TextBox
A. Modulus %
B. Division /
C. Multiplication *
D. None of the above
A. Ampersand (&)
B. Dollar sign ($)
C. Percent symbol (%)
D. Pound symbol
A. 1/1/0001 12:00:00 AM
B. _ (underscore)
C. =
D. Advance the insertion point to the next line in a control
A. Assigning the predefined constant String.Empty to the text property
B. I = P x ( Y x ( B * 1 - A) )
C. LblTotalSold.text = intQuantity.ToString()
D. LblTotalSale.text = decTotSale.ToString(
A. Items Count
B. Items
C. Entries
D. Text