Do you know that? $52 average hourly rates for Video production freelance next

Contact Email: teammmrem@yahoo.com

<< All Upwork (oDesk) and Elance Tests << Elance test answers << IT & Programming category

Test answers for Visual Basic 2020

(66) Last updated: February 28
Elance • IT & Programming
Questions and answers are regularly updated. Answered and not answered tests questions.

This helps getting job: Hundreds of (cover letter examples , interview questions , profile samples ) • Earn on Upwork (oDesk)
Job assistance: jobs popularityfreelance rates

Popular test answers: HTML, .Net, CSS, English, SEO, Photoshop, iOS, Java, Android, Ruby, Python, JavaScript

See all 6 tests answers updated

Find Upwork (oDesk) and Elance test answers on this website:



Collapse | Expand

66 Answered Test Questions:

1. If, Then, Else are examples of:

Answers:

• variables

• events

• conditionals

• operators

2. What is MAPI ?

Answers:

• Messaging Application Programming Interchange

• Messaging Application Programming Interfere

• None of the Above

• Messaging Administration Programming Interface

• Messaging Application Programming Interface

3. Which of the following, when inputted into the command prompt, will successfully launch the Visual Basic script file_name.vbs?

Answers:

• cscript file_name.vbs

• Pressing enter after you write: file_name.vbs

• All of these are correct

• wscript file_name.vbs

4. How to declare a variable in VB?

Answers:

• Declare @(Variable) (Datatype)

• (Datatype) (Variable);

• Dim (Variable) AS (Datatype)

• All of these

5. Visual Basic is derived from:

Answers:

• BASIC

• C++

• Assembly

• Qbasic

6. Visual Basic 6.0 has been replaced by:

Answers:

• Visual Studio

• C++

• Visual C++

• VB.NET

7. What keyword(s) end every procedure

Answers:

• End Sub

• End

• Stop

• Ending

• Stop Procedure

8. Which control can be data bound?

Answers:

• Label

• Textbox

• Checkbox

• All of these

9. The three types of Visual Basic operators are:

Answers:

• divide, multiply, plus

• add, divide, multiply

• arithmetic, relational, and logical

• plus, minus, multiply

10. Visual Basic is an ____________ driven language.

Answers:

• assembly

• asp

• adjective

• event

11. The code to cancel out of a Loop event is:

Answers:

• Delete Loop

• Clear

• Exit Do

• Cancel

12. To declare a variable in Visual Basic, you must use the ___________ function:

Answers:

• Private Sub

• Dim

• Declare

• Loop

13. What is the proper syntax for adding items to a listbox?

Answers:

• listbox.newitem.add(item)

• listbox.items.item(item).register

• listbox.setnewitem = item

• listbox.itemmenu.add(item)

• listbox.items.add(item)

14. Visual Basic can do which of the following?

Answers:

• All are correct

• Develop Windows applications

• Create ActiveX controls

• Create executable files (EXE files)

• Create DLL files

15. When you save a project as an executable file, you are actually:

Answers:

• coding

• deleting

• decompiling

• compiling

16. LoadPicture is a function of an Image control that can:

Answers:

• format the border of the image

• change the color of the image

• populate the picture with an image from a specified directory

• delete an existing picture

17. Visual Basic applications display a Windows style screen called a form.

Answers:

• True

• False

18. A variable can be assigned a value.

Answers:

• False

• True

19. Which character must be placed at the beginning of a line to indicate that it is a comment (not considered part of the code)?

Answers:

• -

• "

• #

• +

• '

20. The default file type for a Visual Basic project is:

Answers:

• .frm

• .vbo

• .mvb

• .vbp

21. Press _________ to run a program.

Answers:

• F7

• F4

• F5

• F6

22. Once you complete a program, you can compile it into a _________ file.

Answers:

• .html

• .vbp

• .exe

• .vb

23. What keyword starts every procedure?

Answers:

• For

• With

• Start

• Sub

• Begin

24. The programmer can enter, edit, and view the language of Visual Basic in the:

Answers:

• document

• form explorer

• code window

• project explorer

25. How do you enter in comments without having an output?

Answers:

• */

• %

• @

• '

• %%

26. To create a function that returns a value you must use a:

Answers:

• function

• none of these

• sub

• procedure

27. To show a form, use the ____________ command.

Answers:

• display

• visible

• show

• appear

28. The Enterprise Edition of Visual Basic is aimed at:

Answers:

• file sharing

• decompiling

• C++

• network oriented clients

29. Integer is an example of a:

Answers:

• number

• procedure

• data type

• variable

30. The '&' symbol is the safest _________ operator to use in Visual Basic.

Answers:

• Boolean

• Arithmetic

• Concatenation

• Relational

31. Visual Basic is considered a ___________ programming language.

Answers:

• high level

• mid-level

• low level

• assembly level

32. Can you access and modify the Windows Registry by using VB Scripting?

Answers:

• No

• Yes

• You can read but cannot write

33. What code will adjust the Zoom Level on a worksheet in Excel to 80%?

Answers:

• ActiveWindow.Zoom = -20

• Zoom = 80

• ActiveWindow.Zoom = 80

• ActiveWindow.Zoom.Adjust = 80

• Application.Zoom = 80

34. How do you prevent the screen from flickering while running a macro?

Answers:

• Application.Visible = True

• Application.Visible = False

• Application.ScreenUpdating = False

• Application.ScreenUpdating = True

• Application.DisplayAlerts = False

35. B=2 C=3 What does A=B=C output?

Answers:

• False

• 2

• 3

• 6

• True

36. What type of executable can VB6 not produce?

Answers:

• ActiveX Control

• Native DLL

• ActiveX DLL

• Standard EXE

• ActiveX EXE

37. What keyword ends a For loop?

Answers:

• End Loop

• Done

• End

• End For

• Next

38. MDI is an IDE developed by Microsoft and stands for:

Answers:

• Multiple Data Interface

• Multiple Document Interface

• Microsoft Document Interface

• Microsoft Data Interface

39. Which of the following is a correct example of Windows API import declaration in VB6

Answers:

• Public External Sub RtlMoveMemory Lib "Kernel32" (lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)

• DllImport Sub CopyMemory From "Kernel32" Original "RtlMoveMemory" (lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)

• Import Function "RtlModelMemory" As "CopyMemory" From "Kernel32" (lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)

• Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)

• Import Function "RtlModelMemory" Alias "CopyMemory" From "Kernel32" ([Pointer] lpvDest As Any, [Pointer] lpvSource As Any, ByVal cbCopy As Long)

40. Which of the following is NOT the value of StartUpPosition property in Visual Basic 6?

Answers:

• 2 - CenterScreen

• 4 - Automatic

• 0 - Manual

• 1 - CenterOwner

• 3 - Windows Default

41. Lower bound of arrays in VB 6 is

Answers:

• Default is 1. Can be set to 0 by "Option Base 0"

• 1

• Determined by a compiler switch

• Default is 0. Can be set to 1 by "Option Base 1"

• 0

42. What is the difference between LockPessimistic and LockOptimistic ADO locking types.

Answers:

• LockPessimistic Locks the row automatically. LockOptimistic Locks the only when initiated by code.

• There is no difference

• LockPessimistic Locks the row once after any edits occur. LockOptimistic Locks the row only when Update is called.

• LockPessimistic Locks the row only when Update is called. LockOptimistic Locks the row once after any edits occur.

43. What does Option Explicit refer to?

Answers:

• Options for all built in controls is restricted.

• All variables with their types must be declared before use.

• All variables must be declared before use. Their type is not required.

• variables are defined automatically

44. What is the max size allowed in characters for Msgbox Prompt and Input Box?

Answers:

• 2048

• 512

• 1024

• 256

• 780

45. Dim x, y as integer. What is x and y data type?

Answers:

• Wrong declaration

• x as variant and y as integer

• Both are integers

46. To debug VB 6 applications with source code using a native debugger like Visual Studio, one must

Answers:

• add "NATIVE=1:DEBUG=1" to "Conditional Compilation Arguments"

• "Compile to P-Code" and enable "Create Symbolic Debug Info"

• Attach to VB6.exe from Visual Studio

• "Compile to Native Code" and enable "Create Symbolic Debug Info"

• select "Start with Full Compile" from "Run" menu

47. Which one of the following property pages is not provided by Visual Basic 6

Answers:

• StandardLayout

• StandardColor

• StandardPicture

• StandardFont

• StandardDataFormat

48. What two methods are called from the ObjectContext object to inform MTS that the transaction was successful or unsuccessful?

Answers:

• TransactionSucess and TransactionFail

• ObjectComplete and SetObject

• SetComplete and SetAbort.

• ObjTransOk and ObjTransFail

49. How do you make a property default in VB 6?

Answers:

• You can not

• Rename your property to "Default"

• Set "Procedure ID" property of property to "(Default)" in "Procedure Attributes" dialog

• Using "Option Default Property 'propertyname'" in "General Declarations" section

• Decorate it with "<Default>" attribute

50. In Visual Basic 6, How will you disable/hide the control box on a form?

Answers:

• By Passing parameter FALSE to Forms SHOW Method

• Using Windows API

• By Setting ControlBox Property to True

• By Setting ControlBox Property to False

• By Setting ControlBox Property to False or by using Windows API

51. What is the correct entry:

Answers:

• Dim s : s=2

• Dim s=2

• Dim s:=2

• Dim s:2

52. For Excel... What is the shortest code that would AutoFit all rows in the active worksheet?

Answers:

• ActiveWindow.Cells.Rows.AutoFit

• ActiveWorkbook.Rows.AutoFit

• Cells.EntireRow.AutoFit

• ActiveWorkbook.EntireRow.AutoFit

• Rows.AutoFit

53. True or False? In Visual Basic 6, to enable automatic re-painting of MDI Form, we have to set AutoRedraw=True

Answers:

• True

• False

54. For Excel, what is the shortest code that would change the column width of columns L & X to 30?

Answers:

• Range("L:X").ColumnWidth= 30

• Select("L:L,X:X").ColumnWidth= 30

• Columns("L:X").Width= 30

• Columns("L:L,X:X").Width= 30

• Range("L:L,X:X").ColumnWidth= 30

55. Which one of the following cannot be added to a UserControl in VB6

Answers:

• An OCX Control

• Another UserControl

• Timer Control

• OLE Control

56. When an ActiveX project is compiled, its COM interface can be preserved by using Binary Compatibility. Between compilations VB creates different interfaces for modified parts of classes. This is called:

Answers:

• COM Compatibility

• Interface Forwarding

• Retained in Memory

• Assume No Aliasing

• Out of Process Library

57. In Visual Basic 6, which one is NOT a parameter of connection objects open method?

Answers:

• Password

• Connection String

• UserID

• Source

• Options

58. To make a UserControl transparent

Answers:

• Set Opacity to 0

• Add WindowStyle VB_TRANSPARENT

• Set Transparent to True

• Set BackColor to Transparent

• Set BackStyle to Transparent

59. Which property is required to place a control on Visual Basic 6 MDI Form?

Answers:

• Align Property

• IsChild Property

• DrawMode Property

• AutoRedraw Property

• IsParent Property

60. KeyDown is an example of a:

Answers:

• command

• executable

• function

• procedure

61. What is the numeric value for the boolean "True"?

Answers:

• -1

• 1

• 0

• 1 byte

62. What is the window class of a debugged MDI application in VB6

Answers:

• ThunderMDIForm

• VB6MDIForm

• VBFormMDI6

• VBFormMDI

• ThunderMDI6Form

63. What command line argument is passed to an out of process COM server to register it

Answers:

• regsvr64

• regserver

• register

• regsvr32

• DllSelfRegister

64. For Excel, what will the following code do?  Range("A2").Select: ActiveWindow.FreezePanes = True

Answers:

• Freeze Row 1

• Remove current Freeze Panes settings

• Freeze Column A & Row 2

• Freeze Panes will not work with that range selected

• Freeze Column A

65. How do you bold an output text?

Answers:

• text.selbold=true

• .bold=true

• select.bold=true

• text.bold=true

• .SelBold=true

66. What is the maximum value of the Interval Property for a timer?

Answers:

• 128 seconds

• 1.4 seconds

• 60 seconds

• 65.5 seconds

• 10 seconds