8/6/2019 VB Interview Questions
1/26
VB interview questions
1. You are creating a client application that calls ActiveX DLLs. Which of the following properties of
the Err object provides the name of a component that sends an error back to the client application?
Number
Description CompName
Component
Source
Text
Desc
None of the above
2. If the Cancel Error Property of the CommonDialog Box is set to true then which of the following
statement is true:
A runtime error can result if the user clicks the cancel button
A compile time error occurs
The program executes without any error You need to carry out conditional compilation
None of the above
3. What is the extension of the Visual Basic project file that stores the design of a user control.
.ctx
.ctl
.ctr
.ocx
.vbp
.dll
.ucl
.utl
4. A __________ control defaults to displaying the files in the current directory:
File List Box
Dir List Box
Drive List Box
Combo Box
Picture Box
List Box
Combo Box
DataGrid
5. To destroy an object and free the memory space occupied by it, the keyword used is:
Delete
Kill Nothing
New
Calloc
New
Conserve
Free
6. Which event of a text box would you use for validating the data entered by the user?
8/6/2019 VB Interview Questions
2/26
Validate
Validation
Check
Audit
GotFocus
Checkdata ValidateDate
7. Which of the following statements forces inline error handling?
On Error GoTo linelabel
On Error GoTo Inline
On Error Stop
On Error Resume Next
On Error GoTo 0
On Error Resume
None of the above
8. The _______ method resets the contents of bound controls to their original values when the user
clicks on the cancel button.
UpdateControls
PaintPicture
Refresh
Resize
Resync
Restore
Cancel
Update
9. To deactivate the Form UnLoad event, you make the following change in the function definiton:
Private Sub Query_Unload(Cancel as Integer,UnloadMode as Integer)
To prevent the Form from closing, you will set the:
Cancel parameter to a non-zero value Cancel parameter to 0
UnloadMode parameter to a non-zero value
UnloadMode parameter to a zero value
UnloadMode parameter to 1
Cancel parameter to 1
10. How many root nodes can a TreeView control have?
1
2
3
4
5 10
Up to 50
No limit
11. A project group is a Project which:
Consists of several Programs
Consists of several Applications
Consists of Various Forms And Code Modules
Consists of several Projects
8/6/2019 VB Interview Questions
3/26
12. Procedures declared in a _____ are local whereas procedures declared in a ______ are available
to the whole application.
Form window, standard or code module
Project window, view code window
Class module, code module
13. How can you keep the user from exiting a form by clicking the Close button? Place code in the Terminate event
Place code in the Unload event
Place code in the QueryUnload event
This can only be done by using the Windows API
Place code in the Load event
Place code in the Terminate event
Place code in the Deactivate event
None of the above
14. In order to provide a transparent background to the Form, you must change the _________
property to _______.
BackStyle, Opaque
BackColor, White
BackStyle, Transparent
BackColor, Parent Windows Color
ZOrder, 0
BackColor, Transparent
15. The _______ property enables Visual Basic to draw complete images in memory before displaying
them on the Screen.
AutoRedraw = True
AutoRedraw = False
Refresh
PaintPicture
16. You want to display the code and the description of an error. What would be the correct syntax? Msgbox err.no & err.text
Msgbox err.number & err.text
Msgbox error.number & error.text
Msgbox error.number & error.description
Msgbox err.number & err.description
Msgbox err.num & err.description
Msgbox err.num & err.text
None of the above
17. What is the purpose of the Image List Control?
To display images to the user
To help in creating a ToolBar To allow the editing of icons
To provide a repository for images used by other controls
To provide images to the listbox control
To provide images for the splash screen
To provide icons for error messages
18. Which method would you use to get a free or unused File identifier while opening any file:
FreeFile
GetFileNum
8/6/2019 VB Interview Questions
4/26
GetFile
GetBytes
NextFile
File
GetNextFile
None of the above19. Which property procedure is used to retrieve the value of a property?
Retrieve
Get
GetProperty
Value
RetrieveValue
20. Which of the following can be shown to the user using the Common Dialog control in VB?
Common messages passed to Windows
Open dialog box
Windows explorer
Input box
Message box
Error messages
Help
None of the above
21. Which event is triggered when the user moves to another open form?
Unload
QueryUnload
Deactivate
Terminate
Load
Initialize
Repaint Resize
22. Which event of an ActiveX control data provider runs every time a bound control extracts data
through the provider?
GetDataMember
GetDataField
GetDataProperty
GetDataRow
GetData
GetFields
GetRows
RetrieveData23. Which of the following are not properties of Command Button:
Caption
Visible
Multi-Line
Font
Name
Bold
Tag
8/6/2019 VB Interview Questions
5/26
Enabled
24. You are creating an ActiveX component that raises user-defined errors. Which of the following
statements correctly raises an error to the client with error number 20000?
Err.Raise vbObjectError + 20000
Err.Number = 20000
Err.Raise 20000 Err.Raise vbObjectError,20000
Err.Number 20000
Error.Raise vbObjectError + 20000
Error.Number 20000
Error.Raise 20000
25. Which events enable you to determine which key was pressed by the user?
Click and KeyPress
Click, KeyUp and KeyDown
KeyUp and KeyDown
KeyPress, KeyUp and KeyDown
Click, KeyPress, KeyUp and KeyDown
26. In order to access a file in Non-textual format, you have to open file in:
Ascii Format
Binary Format
Input Mode
Output mode
Append mode
Read Mode
27. Visual Basic displays information depending upon the current value of two properties of the form,
called:
CurrentX and CurrentY
ScaleLeft and ScaleTop
ScaleHeight and ScaleTop x and y
TopX and TopY
LeftX and LeftY
28. Which of the following procedure types will execute when you assign a value to a property of an
object?
Property Get
Property Assign
Property Let
Property Set
Public Sub
29. In order to overlap the controls (say a command button) during design time, we use the Send To Back or Bring To Front option from the Edit menu. To
change it dynamically (i.e.during program execution) we need to change:
Background color property
Caption property
ZOrder property
AutoRedraw property
SendtoBack property
BringtoFront property
8/6/2019 VB Interview Questions
6/26
Hide property
Show property
30. Name the only property supported by a collection?
Name
Index
Count Type
Value
Add
Remove
None of the above
31. Which of the following situations would not cause the Initialize event of an ActiveX control to
occur?
When a control is placed on a form at design time
When a form designer containing a control is closed
When a form is run
When a compiled application containing a control executes
When an application terminates and re-enters design-time for the host application
32. Which event occurs only once in the entire life cycle of an ActiveX control?
Initialize
Resize
Terminate
WriteProperties
InitProperties
Activate
None of the above
33. You are creating an ActiveX component that raises user-defined errors. What is the valid range of
error numbers that you can use for user-defined errors?
1-1000 0-255
1-65535
0-1000
513-65535
1000-2000
10000-20000
None of the above
34. Which property of the ProgressBar determines how much of the bar is filled?
Min
Max
Value CurrentVal
FillValue
Fill
BarComplete
35. The ______ function can be used to run any .com, .exe, .bat or .pif file from a Visual Basic
program.
Shell
Substr
8/6/2019 VB Interview Questions
7/26
SetAttr
CStr
Exec
Perform
Do
None of the above36. One can convert a Visual Basic Application into ActiveX Document using:
Visual Database Manager
Application Wizard
ActiveX Document Migration Wizard
Package and Deployment Wizard
37. The caption and the name properties of the command button:
Are one and the same
Can be different at times
Are actually not properties
38. You try to initialize a new Object variable with the following line but receive an error. What could be
the possible cause?
Set MyVar = New Classname
You do not need to use the Set command here
You do not have the permission to access the class
MyVar has not been declared
You do not need to use the New keyword here
None of the above
39. Which of the following will perform a direct execution of a Command object?
The Execute method
The Prepare method
The ExecDirect method
The Open method
The Exec method The ExecProcedure method
None of the above
40. The vbCritical symbol displays:
A warning query icon
A critical message icon
A warning message icon
An exclamation icon
None of the above
41. What does the forms collection contain?
A list of all forms in a project
A list of all hidden forms A list of all currently loaded forms
A list of all visible forms
All the child forms of an MDI application
42. Which method of the Recordset object should you use to navigate multiple recordsets returned by a
stored procedure?
NewRecordset
NavigateRecordset
OpenNextRecordset
8/6/2019 VB Interview Questions
8/26
NextRecordset
SkipRecordset
PreviousRecordset
JumpRecordset
GoTORecordset
43. Which of the following cannot be included in the Open method of the recordset? Cursor Type
User Name
Active Connection
CursorLocation
LockType
Source
44. The settings for the Color properties in Visual Basic are indicated by:
Decimal Coding
Octal Coding
Hexadecimal Coding
Binary Coding
45. What you must do before you make calls to an ActiveX DLL project in the same Project Group?
Compile the DLL
Check the DLL off in your projects Reference List
Make sure the DLL is the Startup Project
Ensure that a Standard Exe form is included and is made the Startup Form.
46. The _______ property changes the tab order at runtime:
Tab stop
Tab key
Tab order
Tab index
47. What do CurrentX and CurrentY return?
Current X and Y co-ordinates of mousepointer Current X and Y co-ordinates of cursor
A String of X & Y
Current x and y co-ordinates of the control
48. The Kill command in Visual Basic is used for:
Stopping the current process
Deleting files
Terminating the application
Stopping the current thread
Debugging the application
Error handling
None of the above49. If one needs to use an ampersand(&) in a Label but does not want it to be an Access Key, the
_______ property of the label must be set to False.
Caption
ClipControls
UseMnemonic
LinkMode
Locked
Label
8/6/2019 VB Interview Questions
9/26
ZOrder
Visible
50. Which of the following is the only drag related event?
DragEnter
DragLeave
DragStart DragStop
DragDrop
BeginDrag
EndDrag
51. Which property of the form changes the forms title?
Name
Heading
Title
Caption
Logo
52. Labels do not respond to _____ and ______ events.
Got_Focus, Lost_Focus
Click, DblClick
Dragdrop, OLECompleteDrag
Change, Link Error
53. Which of the following statements is capable of abandoning a series of modifications made to a
recordset locked with a BatchOptimistic lock?
CancelUpdate
CancelBatch
CancelBatchUpdate
AbandonBatch
AbandonBatchUpdate
Rollbackupdate Rollbackbatch
None of the above
54. Which three methods does the collection object support?
Let, Get, Set
Load, Unload, Count
Add, Remove, Item
Add, Delete, Index
Add, Remove, Sort
Add, Remove, Count
Add, Delete, Count
Add, Set, Count55. Which line of code listed here can be used to create a string of fixed length:
Dim strFirstName as String
strFirstName * 255
strFirstName = 255
Dim strFirstName as String(255)
None of the above
8/6/2019 VB Interview Questions
10/26
8/6/2019 VB Interview Questions
11/26
Load, Paint, Initialize and Resize
Initialize, Paint, Load and Resize
Paint, Resize, Initialize and Load
60. Which parameter of the WriteProperty method can be omitted but should be included to increase
the efficiency of the control?
Name Value
Caption
PropBag
DefaultValue
Title
Tag
None of the above
61. Message Boxes can hold a maximum of _______ characters.
256
512
1024
2046
4092
5000
10000
No limit
62. Which parameter of the Execute method of the Connection object returns the number of records
that the operation affected?
RecordsAffected
RowsAffected
RecordsUpdated
RowsOperated
RecordsOperated63. Which of the following is not an element of the ADO model?
Database
Error
Connection
Parameter
Recordset
Field
Driver
64. What data type is the HelpContextID?
String
Integer Single
Double
Long
Char
Float
65. Variables that allow sharing of values across event procedures are called:
Form level variable
Object variable
8/6/2019 VB Interview Questions
12/26
Module level variable
66. Which property of the ListView control determines which field a sort is based on?
Sorted
SortKey
SortOrder
SortField Sort
Key
ListKey
None of the above
67. Consider the following subprogram:
Sub ChangeText(ByVal X as String,Y as String)
Y = X
End Sub
If you are calling it using the following code:
Call ChangeText(Form1.Caption,Y$)
The Caption of Form1 will change to the value contained in Y$
The Caption of Form1 will not change
The Caption changes at random intervals after the function call
The code is incorrect
68. Visual Basic fires the _______ event everytime a part of the form is newly exposed.
Load
Activate
Paint
Show
Initialize
69. Which of the following ADO recordset types provides the greatest degree of concurrency?
Static Forward-only
Dynamic
Keyset
Read only
Keyset and Dynamic
70. Which of the following is the only valid Resume statement in an error handler?
Resume prior
Resume previous
Resume later
Resume next
Resume before Resume to
Resume statement
Resume application
This entry was posted inVB. Bookmark thepermalink.Post a commentor leave a trackback:Trackback URL.
Database developer interview questions
MS SQL Server developer interview
http://www.techinterviews.com/interview-questions/vbhttp://www.techinterviews.com/interview-questions/vbhttp://www.techinterviews.com/interview-questions/vbhttp://www.techinterviews.com/vb-interview-questions-2http://www.techinterviews.com/vb-interview-questions-2http://www.techinterviews.com/vb-interview-questions-2http://www.techinterviews.com/vb-interview-questions-2#respond%23respondhttp://www.techinterviews.com/vb-interview-questions-2#respond%23respondhttp://www.techinterviews.com/vb-interview-questions-2#respond%23respondhttp://www.techinterviews.com/vb-interview-questions-2/trackbackhttp://www.techinterviews.com/vb-interview-questions-2/trackbackhttp://www.techinterviews.com/vb-interview-questions-2/trackbackhttp://www.techinterviews.com/database-developer-interview-questionshttp://www.techinterviews.com/ms-sql-server-developer-interviewhttp://www.techinterviews.com/vb-interview-questions-2http://www.techinterviews.com/vb-interview-questions-2#respond%23respondhttp://www.techinterviews.com/vb-interview-questions-2/trackbackhttp://www.techinterviews.com/database-developer-interview-questionshttp://www.techinterviews.com/ms-sql-server-developer-interviewhttp://www.techinterviews.com/interview-questions/vb8/6/2019 VB Interview Questions
13/26
Ads by Google
Job Vacancies in TCS
Exp: 0 to 13 Yrs.Sal: 25k to 95k PM Apply Now & get Multiple Interviews
TimesJobs.com/TCS
TCS Hiring Now
Exp:0-5 yrs, Sal:25-100k Submit CV to ApplyMonsterIndia.com
34 COMMENTS ON VB INTERVIEW QUESTIONS
1. shvraj Dabi
Posted 5/9/2006 at 1:16 pm |Permalink
2.We set the CancelError property equal to True to cause an error to be raised if the user closes thedialog box by clicking Cancel or the Close button. The error number returned is 32755
Ans. 1
2. shvraj Dabi
Posted 5/9/2006 at 1:17 pm |Permalink
1.Description
3. shvraj Dabi
Posted 5/9/2006 at 1:28 pm |Permalink
3.If this is a question about activex control component then it is .CAB
4. shvraj Dabi
Posted 5/9/2006 at 1:35 pm |Permalink
5.Nothing
5. shvraj Dabi
http://www.google.com/url?ct=abg&q=https://www.google.com/adsense/support/bin/request.py%3Fcontact%3Dabg_afc%26url%3Dhttp://www.techinterviews.com/vb-interview-questions-2%26hl%3Den%26client%3Dca-pub-1894578950532504%26adU%3DTimesJobs.com/TCS%26adT%3DJob%2BVacancies%2Bin%2BTCS%26adU%3DMonsterIndia.com%26adT%3DTCS%2BHiring%2BNow%26gl%3DIN&usg=AFQjCNHeBwH60_dtlpZFEAJ_h1qOwPUHZghttp://www.google.com/url?ct=abg&q=https://www.google.com/adsense/support/bin/request.py%3Fcontact%3Dabg_afc%26url%3Dhttp://www.techinterviews.com/vb-interview-questions-2%26hl%3Den%26client%3Dca-pub-1894578950532504%26adU%3DTimesJobs.com/TCS%26adT%3DJob%2BVacancies%2Bin%2BTCS%26adU%3DMonsterIndia.com%26adT%3DTCS%2BHiring%2BNow%26gl%3DIN&usg=AFQjCNHeBwH60_dtlpZFEAJ_h1qOwPUHZghttp://googleads.g.doubleclick.net/aclk?sa=l&ai=BQU-43Y90TYKlDoWScO7MwZ0FnfzA7wH96_fFGY2pr4BWwNB3EAEYASDymfQBKAI4AFDws6uuBWDlwuSDpA6gAfPn9PIDsgEWd3d3LnRlY2hpbnRlcnZpZXdzLmNvbcgBAdoBNmh0dHA6Ly93d3cudGVjaGludGVydmlld3MuY29tL3ZiLWludGVydmlldy1xdWVzdGlvbnMtMvgBAakCjauSXUz2Vz7AAgHIAsW9hBWoAwHoA94F6AMf9QMAAADE&num=1&sig=AGiWqtyln5ob6JkbkZgRTz6eCGbju6UMDg&client=ca-pub-1894578950532504&adurl=http://tracking-in.sokrati.com/click%3Fclient_id%3D60%26tag%3Dtim60-0118-1%26redirect_url%3Dhttp%253A%252F%252Fwww.timesjobs.com%252Fcandidate%252Fregister.html%253FoutSource%253DIT_SEM%2526siteparams%253D3p9909%2526utm_source%253Dgoogle%2526utm_medium%253Dcpc%2526utm_campaign%253Dsearchhttp://googleads.g.doubleclick.net/aclk?sa=l&ai=BQU-43Y90TYKlDoWScO7MwZ0FnfzA7wH96_fFGY2pr4BWwNB3EAEYASDymfQBKAI4AFDws6uuBWDlwuSDpA6gAfPn9PIDsgEWd3d3LnRlY2hpbnRlcnZpZXdzLmNvbcgBAdoBNmh0dHA6Ly93d3cudGVjaGludGVydmlld3MuY29tL3ZiLWludGVydmlldy1xdWVzdGlvbnMtMvgBAakCjauSXUz2Vz7AAgHIAsW9hBWoAwHoA94F6AMf9QMAAADE&num=1&sig=AGiWqtyln5ob6JkbkZgRTz6eCGbju6UMDg&client=ca-pub-1894578950532504&adurl=http://tracking-in.sokrati.com/click%3Fclient_id%3D60%26tag%3Dtim60-0118-1%26redirect_url%3Dhttp%253A%252F%252Fwww.timesjobs.com%252Fcandidate%252Fregister.html%253FoutSource%253DIT_SEM%2526siteparams%253D3p9909%2526utm_source%253Dgoogle%2526utm_medium%253Dcpc%2526utm_campaign%253Dsearchhttp://googleads.g.doubleclick.net/aclk?sa=l&ai=B6T6D3Y90TYKlDoWScO7MwZ0F6b2O2gHp7qyCGcCNtwHwxMYCEAIYAiDymfQBKAI4AFC0pKO8-f____8BYOXC5IOkDqABp7ma_QOyARZ3d3cudGVjaGludGVydmlld3MuY29tyAEB2gE2aHR0cDovL3d3dy50ZWNoaW50ZXJ2aWV3cy5jb20vdmItaW50ZXJ2aWV3LXF1ZXN0aW9ucy0yqQKNq5JdTPZXPsgCgbSVFqgDAegD3gXoAx_1AwAAAMQ&num=2&sig=AGiWqtxtOlBQZ23q-r9jDE1aqzFKGpdMww&client=ca-pub-1894578950532504&adurl=http://my.monsterindia.com/create_account.html%3Fspl%3DG_TCS_Content_Optihttp://googleads.g.doubleclick.net/aclk?sa=l&ai=B6T6D3Y90TYKlDoWScO7MwZ0F6b2O2gHp7qyCGcCNtwHwxMYCEAIYAiDymfQBKAI4AFC0pKO8-f____8BYOXC5IOkDqABp7ma_QOyARZ3d3cudGVjaGludGVydmlld3MuY29tyAEB2gE2aHR0cDovL3d3dy50ZWNoaW50ZXJ2aWV3cy5jb20vdmItaW50ZXJ2aWV3LXF1ZXN0aW9ucy0yqQKNq5JdTPZXPsgCgbSVFqgDAegD3gXoAx_1AwAAAMQ&num=2&sig=AGiWqtxtOlBQZ23q-r9jDE1aqzFKGpdMww&client=ca-pub-1894578950532504&adurl=http://my.monsterindia.com/create_account.html%3Fspl%3DG_TCS_Content_Optihttp://www.techinterviews.com/vb-interview-questions-2#comment-25364%23comment-25364http://www.techinterviews.com/vb-interview-questions-2#comment-25364%23comment-25364http://www.techinterviews.com/vb-interview-questions-2#comment-25365%23comment-25365http://www.techinterviews.com/vb-interview-questions-2#comment-25366%23comment-25366http://www.techinterviews.com/vb-interview-questions-2#comment-25366%23comment-25366http://www.techinterviews.com/vb-interview-questions-2#comment-25367%23comment-25367http://www.techinterviews.com/vb-interview-questions-2#comment-25367%23comment-25367http://www.google.com/url?ct=abg&q=https://www.google.com/adsense/support/bin/request.py%3Fcontact%3Dabg_afc%26url%3Dhttp://www.techinterviews.com/vb-interview-questions-2%26hl%3Den%26client%3Dca-pub-1894578950532504%26adU%3DTimesJobs.com/TCS%26adT%3DJob%2BVacancies%2Bin%2BTCS%26adU%3DMonsterIndia.com%26adT%3DTCS%2BHiring%2BNow%26gl%3DIN&usg=AFQjCNHeBwH60_dtlpZFEAJ_h1qOwPUHZghttp://googleads.g.doubleclick.net/aclk?sa=l&ai=BQU-43Y90TYKlDoWScO7MwZ0FnfzA7wH96_fFGY2pr4BWwNB3EAEYASDymfQBKAI4AFDws6uuBWDlwuSDpA6gAfPn9PIDsgEWd3d3LnRlY2hpbnRlcnZpZXdzLmNvbcgBAdoBNmh0dHA6Ly93d3cudGVjaGludGVydmlld3MuY29tL3ZiLWludGVydmlldy1xdWVzdGlvbnMtMvgBAakCjauSXUz2Vz7AAgHIAsW9hBWoAwHoA94F6AMf9QMAAADE&num=1&sig=AGiWqtyln5ob6JkbkZgRTz6eCGbju6UMDg&client=ca-pub-1894578950532504&adurl=http://tracking-in.sokrati.com/click%3Fclient_id%3D60%26tag%3Dtim60-0118-1%26redirect_url%3Dhttp%253A%252F%252Fwww.timesjobs.com%252Fcandidate%252Fregister.html%253FoutSource%253DIT_SEM%2526siteparams%253D3p9909%2526utm_source%253Dgoogle%2526utm_medium%253Dcpc%2526utm_campaign%253Dsearchhttp://googleads.g.doubleclick.net/aclk?sa=l&ai=BQU-43Y90TYKlDoWScO7MwZ0FnfzA7wH96_fFGY2pr4BWwNB3EAEYASDymfQBKAI4AFDws6uuBWDlwuSDpA6gAfPn9PIDsgEWd3d3LnRlY2hpbnRlcnZpZXdzLmNvbcgBAdoBNmh0dHA6Ly93d3cudGVjaGludGVydmlld3MuY29tL3ZiLWludGVydmlldy1xdWVzdGlvbnMtMvgBAakCjauSXUz2Vz7AAgHIAsW9hBWoAwHoA94F6AMf9QMAAADE&num=1&sig=AGiWqtyln5ob6JkbkZgRTz6eCGbju6UMDg&client=ca-pub-1894578950532504&adurl=http://tracking-in.sokrati.com/click%3Fclient_id%3D60%26tag%3Dtim60-0118-1%26redirect_url%3Dhttp%253A%252F%252Fwww.timesjobs.com%252Fcandidate%252Fregister.html%253FoutSource%253DIT_SEM%2526siteparams%253D3p9909%2526utm_source%253Dgoogle%2526utm_medium%253Dcpc%2526utm_campaign%253Dsearchhttp://googleads.g.doubleclick.net/aclk?sa=l&ai=B6T6D3Y90TYKlDoWScO7MwZ0F6b2O2gHp7qyCGcCNtwHwxMYCEAIYAiDymfQBKAI4AFC0pKO8-f____8BYOXC5IOkDqABp7ma_QOyARZ3d3cudGVjaGludGVydmlld3MuY29tyAEB2gE2aHR0cDovL3d3dy50ZWNoaW50ZXJ2aWV3cy5jb20vdmItaW50ZXJ2aWV3LXF1ZXN0aW9ucy0yqQKNq5JdTPZXPsgCgbSVFqgDAegD3gXoAx_1AwAAAMQ&num=2&sig=AGiWqtxtOlBQZ23q-r9jDE1aqzFKGpdMww&client=ca-pub-1894578950532504&adurl=http://my.monsterindia.com/create_account.html%3Fspl%3DG_TCS_Content_Optihttp://googleads.g.doubleclick.net/aclk?sa=l&ai=B6T6D3Y90TYKlDoWScO7MwZ0F6b2O2gHp7qyCGcCNtwHwxMYCEAIYAiDymfQBKAI4AFC0pKO8-f____8BYOXC5IOkDqABp7ma_QOyARZ3d3cudGVjaGludGVydmlld3MuY29tyAEB2gE2aHR0cDovL3d3dy50ZWNoaW50ZXJ2aWV3cy5jb20vdmItaW50ZXJ2aWV3LXF1ZXN0aW9ucy0yqQKNq5JdTPZXPsgCgbSVFqgDAegD3gXoAx_1AwAAAMQ&num=2&sig=AGiWqtxtOlBQZ23q-r9jDE1aqzFKGpdMww&client=ca-pub-1894578950532504&adurl=http://my.monsterindia.com/create_account.html%3Fspl%3DG_TCS_Content_Optihttp://www.techinterviews.com/vb-interview-questions-2#comment-25364%23comment-25364http://www.techinterviews.com/vb-interview-questions-2#comment-25365%23comment-25365http://www.techinterviews.com/vb-interview-questions-2#comment-25366%23comment-25366http://www.techinterviews.com/vb-interview-questions-2#comment-25367%23comment-253678/6/2019 VB Interview Questions
14/26
Posted 5/9/2006 at 1:36 pm |Permalink
7.On Error GoTo 0
6. shvraj Dabi
Posted 5/9/2006 at 1:46 pm |Permalink
11.Consists of several Projects
7. shvraj Dabi
Posted 5/9/2006 at 1:48 pm |Permalink
14.BackColor, Transparent
8. shvraj Dabi
Posted 5/9/2006 at 1:52 pm |Permalink
15.AutoRedraw = True
9. Kamlesh Patani
Posted 5/26/2006 at 5:51 am |Permalink
4. (1)
10. Kamlesh Patani
Posted 5/26/2006 at 5:59 am |Permalink9. Cancel parameter to 1
12. Form window, standard or code module
16. Msgbox err.number & err.description
17. To provide a repository for images used by other controls
19. Value
http://www.techinterviews.com/vb-interview-questions-2#comment-25368%23comment-25368http://www.techinterviews.com/vb-interview-questions-2#comment-25368%23comment-25368http://www.techinterviews.com/vb-interview-questions-2#comment-25369%23comment-25369http://www.techinterviews.com/vb-interview-questions-2#comment-25369%23comment-25369http://www.techinterviews.com/vb-interview-questions-2#comment-25370%23comment-25370http://www.techinterviews.com/vb-interview-questions-2#comment-25370%23comment-25370http://www.techinterviews.com/vb-interview-questions-2#comment-25371%23comment-25371http://www.techinterviews.com/vb-interview-questions-2#comment-25371%23comment-25371http://www.kamleshpatani.8k.com/http://www.techinterviews.com/vb-interview-questions-2#comment-27184%23comment-27184http://www.techinterviews.com/vb-interview-questions-2#comment-27184%23comment-27184http://www.kamleshpatani.8k.com/http://www.techinterviews.com/vb-interview-questions-2#comment-27185%23comment-27185http://www.techinterviews.com/vb-interview-questions-2#comment-27185%23comment-27185http://www.techinterviews.com/vb-interview-questions-2#comment-25368%23comment-25368http://www.techinterviews.com/vb-interview-questions-2#comment-25369%23comment-25369http://www.techinterviews.com/vb-interview-questions-2#comment-25370%23comment-25370http://www.techinterviews.com/vb-interview-questions-2#comment-25371%23comment-25371http://www.kamleshpatani.8k.com/http://www.techinterviews.com/vb-interview-questions-2#comment-27184%23comment-27184http://www.kamleshpatani.8k.com/http://www.techinterviews.com/vb-interview-questions-2#comment-27185%23comment-271858/6/2019 VB Interview Questions
15/26
11. Kamlesh Patani
Posted 5/26/2006 at 6:08 am |Permalink
20. Open dialog box
21. Deactivate
23.Bold
25. KeyPress, KeyUp and KeyDown
26. Binary Format
27. CurrentX and CurrentY
28. Property Let
29..ZOrder property
34.Max
35.Shell37.Can be different at times
12. Kamlesh Patani
Posted 5/26/2006 at 6:27 am |Permalink
Hi friends, If any this wrong ? than , I am sorry. Give me true answer of that
38. MyVar has not been declared
39. None of the above
40.A critical message icon42.NextRecordset
43.CursorLocation
44.Hexadecimal Coding
45. Ensure that a Standard Exe form is included and is made the Startup Form.
46. Tab index
47. Current X and Y co-ordinates of mousepointer
48. Deleting files
49. LinkMode
50.DragDrop
51.Caption
52.Change, Link Error55.strFirstName * 255
57.Number
58. ToolTipText
59. SendKeys
59.Initialize, Load, Paint and Resize
63.Error
65.Module level variable
http://www.kamleshpatani.8k.com/http://www.techinterviews.com/vb-interview-questions-2#comment-27186%23comment-27186http://www.techinterviews.com/vb-interview-questions-2#comment-27186%23comment-27186http://www.kamleshpatani.8k.com/http://www.techinterviews.com/vb-interview-questions-2#comment-27187%23comment-27187http://www.techinterviews.com/vb-interview-questions-2#comment-27187%23comment-27187http://www.kamleshpatani.8k.com/http://www.techinterviews.com/vb-interview-questions-2#comment-27186%23comment-27186http://www.kamleshpatani.8k.com/http://www.techinterviews.com/vb-interview-questions-2#comment-27187%23comment-271878/6/2019 VB Interview Questions
16/26
67.The Caption of Form1 will not change
68.Activate
69.Dynamic
70.Resume next
13. ac
Posted 6/13/2006 at 9:49 am |Permalink
64. integer
14. ac
Posted 6/13/2006 at 9:55 am |Permalink
62. records affected
15. ac
Posted 6/13/2006 at 9:59 am |Permalink
61. 1024
16. Abhishek Sharan
Posted 6/19/2006 at 2:08 am |Permalink
24. Err.Raise vbObjectError + 20000
17. Arun Kumar
Posted 6/21/2006 at 1:17 am |Permalink
54. Add, Remove, Item
18. Mamatha
http://www.techinterviews.com/vb-interview-questions-2#comment-28032%23comment-28032http://www.techinterviews.com/vb-interview-questions-2#comment-28032%23comment-28032http://www.techinterviews.com/vb-interview-questions-2#comment-28034%23comment-28034http://www.techinterviews.com/vb-interview-questions-2#comment-28034%23comment-28034http://www.techinterviews.com/vb-interview-questions-2#comment-28035%23comment-28035http://www.techinterviews.com/vb-interview-questions-2#comment-28035%23comment-28035http://www.techinterviews.com/vb-interview-questions-2#comment-28341%23comment-28341http://www.techinterviews.com/vb-interview-questions-2#comment-28341%23comment-28341http://www.techinterviews.com/vb-interview-questions-2#comment-28512%23comment-28512http://www.techinterviews.com/vb-interview-questions-2#comment-28032%23comment-28032http://www.techinterviews.com/vb-interview-questions-2#comment-28034%23comment-28034http://www.techinterviews.com/vb-interview-questions-2#comment-28035%23comment-28035http://www.techinterviews.com/vb-interview-questions-2#comment-28341%23comment-28341http://www.techinterviews.com/vb-interview-questions-2#comment-28512%23comment-285128/6/2019 VB Interview Questions
17/26
8/6/2019 VB Interview Questions
18/26
1. Desc
2. A runtime error can result if the user clicks the cancel button
3. .ctl
4. File List Box
5. Nothing6. Validate
7. On Error GoTo 0
8. UpdateControls
9. Cancel parameter to 1
10. No limit
11. Consists of several Projects
12. Form window, standard or code module
13. Place code in the Unload event OR Place code in the QueryUnload event
14. BackStyle, Transparent
15. AutoRedraw = True
16. Msgbox err.number & err.description
17. To provide a repository for images used by other controls
18. FreeFile
19. Get
20. Open dialog box
21. Deactivate
22.
23. Multi-Line AND Bold
24. Err.Raise vbObjectError + 20000
25. KeyPress, KeyUp and KeyDown
26. Binary Format
27. CurrentX and CurrentY
28. Property Let29. ZOrder property
30.
31.
32.
33.
34. Max
35. Shell
36.
37. Can be different at times
38. MyVar has not been declared
39. None of the above40. A critical message icon
41.
42. NextRecordset
43. User Name AND CursorLocation
44. Hexadecimal Coding
45. Ensure that a Standard Exe form is included and is made the Startup Form
46. Tab index
47. Current X and Y co-ordinates of mousepointer
8/6/2019 VB Interview Questions
19/26
48. Deleting files
49. LinkMode
50. DragDrop
51. Caption
52. Got_Focus, Lost_Focus53.
54. Add, Remove, Item
55. strFirstName * 255
56. Only (ii) is correct
57. Number
58. ToolTipText
59. SendKeys
Initialize, Load, Paint and Resize
60.
61. 1024
62. RecordsAffected
63. Error
64. Integer
65. Module level variable
66.
67. The Caption of Form1 will not change
68. Activate
69. Dynamic
70. Resume next
22. Mamatha
Posted 7/19/2006 at 4:35 am |Permalink
Answers:
21 : Deactivate
22 : GetDataMember
23 : Multi-Line, Bold
24 : Err.Raise vbObjectError + 20000
25 : KeyPress, KeyUp and KeyDown
26 : Binary Format
27 : CurrentX and CurrentY
28 : Property Set
29 : ZOrder property
30 : Count
23. Mamatha
http://www.techinterviews.com/vb-interview-questions-2#comment-29452%23comment-29452http://www.techinterviews.com/vb-interview-questions-2#comment-29452%23comment-29452http://www.techinterviews.com/vb-interview-questions-2#comment-29452%23comment-294528/6/2019 VB Interview Questions
20/26
Posted 7/19/2006 at 7:54 am |Permalink
Answer for Question 28 is Property Let.
Sorry I gave wrong answer before
24. Mamatha
Posted 7/21/2006 at 5:58 am |Permalink
Answers :
31 : When a control is placed on a form at design time ,
When a form designer containing a control is closed,
When an application terminates and re-enters design-time for the host application
32 : Initialize
33 : 513 - 65535
34 : Value35 : Shell
36 : ActiveX Document Migration Wizard
37 : Can be different at times
38 : MyVar has not been declared
39 : None of the above
40 : A critical message icon
25. Mamatha
Posted 7/21/2006 at 7:54 am |Permalink
Answers:
41 : A list of all currently loaded forms
42 : NextRecordset
43 : UserName, CursorLocation
44 : Hexadecumal coding
45 : Compile the DLL
46 : TabIndex
47 : Current X and Y co-ordinates of cursor
48 : Deleting Files
49 : UseMnemonic50 : DragDrop
26. Mamatha
Posted 7/24/2006 at 7:28 am |Permalink
http://www.techinterviews.com/vb-interview-questions-2#comment-29456%23comment-29456http://www.techinterviews.com/vb-interview-questions-2#comment-29456%23comment-29456http://www.techinterviews.com/vb-interview-questions-2#comment-29588%23comment-29588http://www.techinterviews.com/vb-interview-questions-2#comment-29588%23comment-29588http://www.techinterviews.com/vb-interview-questions-2#comment-29594%23comment-29594http://www.techinterviews.com/vb-interview-questions-2#comment-29594%23comment-29594http://www.techinterviews.com/vb-interview-questions-2#comment-29774%23comment-29774http://www.techinterviews.com/vb-interview-questions-2#comment-29774%23comment-29774http://www.techinterviews.com/vb-interview-questions-2#comment-29456%23comment-29456http://www.techinterviews.com/vb-interview-questions-2#comment-29588%23comment-29588http://www.techinterviews.com/vb-interview-questions-2#comment-29594%23comment-29594http://www.techinterviews.com/vb-interview-questions-2#comment-29774%23comment-297748/6/2019 VB Interview Questions
21/26
Answers:
51: Caption
52: Got_Focus, Lost_Focus
53: CancelBatch
54: Add, Remove, Item55: None of the Above
56: Only (i) is correct ; (ii) contains an error
57: Number
58: ToolTipText
59: SendKeys,Initialize, Load, Resize and Paint
60: Default Value
27. Mamatha
Posted 7/25/2006 at 5:30 am |Permalink
Answers:
61 : 1024
62 : RecordsAffected
63 : Driver
64 : Integer
65 : Module level variable
66 : SortKey
67 : The Caption of Form1 will not change
68 : Paint
69 : Dynamic70 : Resume next
28. Rana
Posted 8/25/2006 at 4:21 am |Permalink
1. You are creating a client application that calls ActiveX DLLs. Which of the following properties of
the Err object provides the name of a component that sends an error back to the client application?
o Source
2. If the Cancel Error Property of the CommonDialog Box is set to true then which of the followingstatement is true:
o A runtime error can result if the user clicks the cancel button
3. What is the extension of the Visual Basic project file that stores the design of a user control.
o .ctl
4. A __________ control defaults to displaying the files in the current directory:
o File List Box
5. To destroy an object and free the memory space occupied by it, the keyword used is:
http://www.techinterviews.com/vb-interview-questions-2#comment-29814%23comment-29814http://www.techinterviews.com/vb-interview-questions-2#comment-29814%23comment-29814http://www.techinterviews.com/vb-interview-questions-2#comment-31242%23comment-31242http://www.techinterviews.com/vb-interview-questions-2#comment-31242%23comment-31242http://www.techinterviews.com/vb-interview-questions-2#comment-29814%23comment-29814http://www.techinterviews.com/vb-interview-questions-2#comment-31242%23comment-312428/6/2019 VB Interview Questions
22/26
o Nothing
6. Which event of a text box would you use for validating the data entered by the user?
o Validate
7. Which of the following statements forces inline error handling?
o On Error Resume8. The _______ method resets the contents of bound controls to their original values when the user
clicks on the cancel button.
o UpdateControls
9. To deactivate the Form UnLoad event, you make the following change in the function definiton:
Private Sub Query_Unload(Cancel as Integer,UnloadMode as Integer)
To prevent the Form from closing, you will set the:
o Cancel parameter to a non-zero value
10. How many root nodes can a TreeView control have?
o No limit
11. A project group is a Project which:
o Consists of several Programs
12. Procedures declared in a _____ are local whereas procedures declared in a ______ are available
to the whole application.
o Form window, standard or code module
13. How can you keep the user from exiting a form by clicking the Close button?
o Place code in the Unload event
o Place code in the QueryUnload event
14. In order to provide a transparent background to the Form, you must change the _________
property to _______.
o BackStyle, Transparent
15. The _______ property enables Visual Basic to draw complete images in memory before
displaying them on the Screen.
o AutoRedraw = True16. You want to display the code and the description of an error. What would be the correct syntax?
o Msgbox error.number & error.description
o None of the above
17. What is the purpose of the Image List Control?
o To provide a repository for images used by other controls
18. Which method would you use to get a free or unused File identifier while opening any file:
o FreeFile
19. Which property procedure is used to retrieve the value of a property?
o Get
20. Which of the following can be shown to the user using the Common Dialog control in VB?
o Open dialog box21. Which event is triggered when the user moves to another open form?
o Deactivate
22. Which event of an ActiveX control data provider runs every time a bound control extracts data
through the provider?
o GetDataMember
23. Which of the following are not properties of Command Button:
o Multi-Line
o Bold
8/6/2019 VB Interview Questions
23/26
24. You are creating an ActiveX component that raises user-defined errors. Which of the following
statements correctly raises an error to the client with error number 20000?
o Error.Raise vbObjectError + 20000
25. Which events enable you to determine which key was pressed by the user?
o KeyPress, KeyUp and KeyDown26. In order to access a file in Non-textual format, you have to open file in:
o Binary Format
27. Visual Basic displays information depending upon the current value of two properties of the form,
called:
o CurrentX and CurrentY
28. Which of the following procedure types will execute when you assign a value to a property of an
object?
o Property Let
29. In order to overlap the controls (say a command button) during design time, we use the
Send To Back or Bring To Front option from the Edit menu. To
change it dynamically (i.e.during program execution) we need to change:
o ZOrder property
30. Name the only property supported by a collection?
o Count
31. Which of the following situations would not cause the Initialize event of an ActiveX control to
occur?
o When a control is placed on a form at design time
o When a form designer containing a control is closed
o When an application terminates and re-enters design-time for the host application
32. Which event occurs only once in the entire life cycle of an ActiveX control?
o Initialize
33. You are creating an ActiveX component that raises user-defined errors. What is the valid range of
error numbers that you can use for user-defined errors?o 513-65535
34. Which property of the ProgressBar determines how much of the bar is filled?
o Value
35. The ______ function can be used to run any .com, .exe, .bat or .pif file from a Visual Basic
program.
o Shell
36. One can convert a Visual Basic Application into ActiveX Document using:
o ActiveX Document Migration Wizard
37. The caption and the name properties of the command button:
o Can be different at times
38. You try to initialize a new Object variable with the following line but receive an error. What couldbe the possible cause?
Set MyVar = New Classname
o MyVar has not been declared
39. Which of the following will perform a direct execution of a Command object?
o None of the above
40. The vbCritical symbol displays:
o A critical message icon
41. What does the forms collection contain?
8/6/2019 VB Interview Questions
24/26
o A list of all currently loaded forms
42. Which method of the Recordset object should you use to navigate multiple recordsets returned by
a stored procedure?
o NextRecordset
43. Which of the following cannot be included in the Open method of the recordset?o User Name
44. The settings for the Color properties in Visual Basic are indicated by:
o Hexadecimal Coding
45. What you must do before you make calls to an ActiveX DLL project in the same Project Group?
o Compile the DLL
46. The _______ property changes the tab order at runtime:
o Tab index
47. What do CurrentX and CurrentY return?
o Current x and y co-ordinates of the control
48. The Kill command in Visual Basic is used for:
o Deleting files
49. If one needs to use an ampersand(&) in a Label but does not want it to be an Access Key, the
_______ property of the label must be set to False.
o UseMnemonic
50. Which of the following is the only drag related event?
o DragDrop
51. Which property of the form changes the forms title?
o Caption
52. Labels do not respond to _____ and ______ events.
o Got_Focus, Lost_Focus
53. Which of the following statements is capable of abandoning a series of modifications made to a
recordset locked with a BatchOptimistic lock?
o CancelBatch54. Which three methods does the collection object support?
o Add, Remove, Item
55. Which line of code listed here can be used to create a string of fixed length:
o None of the above
56. Consider the following program code:
(i) Dim FileName as String
Open FileName For Input As #FreeFile
(ii) Dim FileName as String
FileNum = FreeFile
Open FileName For Input As #FileNum
o Only (i) is correcto (ii) contains an error
57. Which property of the Err object returns the numeric value associated with the most recent
runtime error?
o Description
o Number
o Source
o Errorcode
o Code
8/6/2019 VB Interview Questions
25/26
59. In Visual Basic, which method can you use to send key strokes to other Window applications?
o SendKeys
58. The ______ property is used to show Tool Tips or Help Balloons when the mouse rests on the
object:
o ToolTipText59. What is the sequence in which the following events are triggered when a form is loaded?
o Initialize, Load, Resize and Paint
60. Which parameter of the WriteProperty method can be omitted but should be included to increase
the efficiency of the control?
o DefaultValue
61. Message Boxes can hold a maximum of _______ characters.
o 1024
62. Which parameter of the Execute method of the Connection object returns the number of records
that the operation affected?
o RecordsAffected
63. Which of the following is not an element of the ADO model?
o Driver
64. What data type is the HelpContextID?
o Integer
65. Variables that allow sharing of values across event procedures are called:
o Module level variable
66. Which property of the ListView control determines which field a sort is based on?
o SortKey
67. Consider the following subprogram:
Sub ChangeText(ByVal X as String,Y as String)
Y = X
End Sub
If you are calling it using the following code:Call ChangeText(Form1.Caption,Y$)
o The Caption of Form1 will not change
68. Visual Basic fires the _______ event everytime a part of the form is newly exposed.
o Paint
69. Which of the following ADO recordset types provides the greatest degree of concurrency?
o Dynamic
70. Which of the following is the only valid Resume statement in an error handler?
o Resume next
29. nash
Posted 8/26/2006 at 1:28 am |Permalink
How could we find out the number of elements in a array?
How to make a function return more than one value?
How to Reverse a Statement or a line?
http://www.techinterviews.com/vb-interview-questions-2#comment-31282%23comment-31282http://www.techinterviews.com/vb-interview-questions-2#comment-31282%23comment-31282http://www.techinterviews.com/vb-interview-questions-2#comment-31282%23comment-312828/6/2019 VB Interview Questions
26/26
30. nagesh
Posted 8/30/2006 at 12:21 am |Permalink
how to find out the number fields in a table?
31. Mamatha
Posted 9/2/2006 at 5:32 am |Permalink
To find out the number of fields in a table, use the cols property.
32. Santosh Kumar Dasari
Posted 10/26/2007 at 5:54 am |Permalink
1) You are creating a client application that calls ActiveX DLLs. Which of the following properties of
the Err object provides the name of a component that sends an error back to the client application?
Ans: Souarce (property source of err object returns the name of the object that orginated the error)
33. Mahesh
Posted 12/19/2007 at 6:36 am |Permalink
Q. 23 - Ans: Multi-Line, bold and Tag are not properties of Command Button.
34. Mahesh
Posted 12/19/2007 at 6:38 am |PermalinkQ. 14 Ans: - Backstyle, Transparent
http://www.techinterviews.com/vb-interview-questions-2#comment-31434%23comment-31434http://www.techinterviews.com/vb-interview-questions-2#comment-31434%23comment-31434http://www.techinterviews.com/vb-interview-questions-2#comment-31780%23comment-31780http://www.techinterviews.com/vb-interview-questions-2#comment-31780%23comment-31780http://www.techinterviews.com/vb-interview-questions-2#comment-133764%23comment-133764http://www.techinterviews.com/vb-interview-questions-2#comment-133764%23comment-133764http://www.techinterviews.com/vb-interview-questions-2#comment-153204%23comment-153204http://www.techinterviews.com/vb-interview-questions-2#comment-153204%23comment-153204http://www.techinterviews.com/vb-interview-questions-2#comment-153206%23comment-153206http://www.techinterviews.com/vb-interview-questions-2#comment-153206%23comment-153206http://www.techinterviews.com/vb-interview-questions-2#comment-31434%23comment-31434http://www.techinterviews.com/vb-interview-questions-2#comment-31780%23comment-31780http://www.techinterviews.com/vb-interview-questions-2#comment-133764%23comment-133764http://www.techinterviews.com/vb-interview-questions-2#comment-153204%23comment-153204http://www.techinterviews.com/vb-interview-questions-2#comment-153206%23comment-153206