- World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.

Get it now !!
Send your Resume to 6000 Companies
VBA Interview Questions & Answers - Learning Mode

VBA Interview Questions & Answers - Learning Mode

VBA (Visual Basic for Applications) is the programming language of Excel and other Office programs. Create a Macro: With Excel VBA you can automate tasks in Excel by writing so called macros. Visual Basic for Applications (VBA) is an implementation of Microsoft's discontinued event-driven programming language, Visual Basic 6, and its associated integrated development environment (IDE).

Try VBA Interview Questions & Answers - Exam Mode

1 2 Next

Sort By : Latest First | Oldest First | By Rating

VBA Interview Questions & Answers - Learning Mode
Try VBA Interview Questions & Answers - Exam Mode
Question: Which controls have refresh method, clear method

Answer: Datagrid,listbox,combobox,label,button have refresh methodand textbox has clear methodalmost all controls have refresh method Source:
Question: Advantage of ActiveX Dll over Active Exe

Answer: Advantages of ActiveX Dll

1) An in-process component shares its client?s address space, so property and method calls don?t have to be marshaled. This results in much faster performance.

Disadvantages of ActiveX Dll

1) If an unhandled error occurs it will cause the client process to stop operating.

Advantages of ActiveX Exe

1) The component can run as a standalone desktop application, like Microsoft Excel or Microsoft Word, in addition to provi Source:
Question: Which controls can not be placed in MDI?

Answer: The Controls which do not have Align property can't be placed on MDI Form.

E.g., Picturebox only has Align property in Standard Components of VB other controls dont have align property an hence can't be drawn on MDI Form.
Question: Explain about the security vulnerabilities for VBA?

Answer: Microsoft Visual basic has its host of problems one such being macros, Macros can be created which can create a havoc for a programmer with good intentions. Also the security issue rests in the hands of the user and not the programmer as such. A user can manipulate the VBA document. Source:
Question: What do ByVal and ByRef mean and which is the default?

Answer: If you pass an argument by reference when calling a procedure, the procedure access to the actual variable in memory. As a result, the variable's value can be changed by the procedure.
If you pass an argument by value when calling a procedure, the variable's value can be changed with in the procedure only outside the actual value of the variable is retained.

Passing by reference is the default in VBA. If you do not explicitly specify to pass an argurment by value, VBA will Source:
Question: Which Property is used to compress a image in image control?

Answer: strech Source:
Question: Which property of textbox cannot be changed at
runtime and what?s the maximum size of a textbox?

Answer: MultiLine Property

No limits
Question: State about the interpretation features of VBA?

Answer: VBA is licensed to Microsoft and this compatible with and only Microsoft products. Code written is compiled by an intermediate language called P-code and this is stored in hosting applications such as Excel, Word and Access. The intermediate code is interpreted by a virtual machine. This code and intermediate language is the exclusive right of Microsoft. Source:
Question: What are the different compatibility types when we create a COM component?

Answer: No compatibility - creates new GUIDproject compatibility binary compatibility - maintains the references Source:
Question: I would like to do the following. If cell A1 contains "Hello" and if the focus is on A1 and if the Enter key is pressed, then the focus should go to B2 and a MsgBox should appear. I think this can be done with key events, something like OnKeyDown, but how do I tell it I want the event only be triggered by the Enter key?

Answer: Use KeyAscii and trap enter(32).

Question: Define and explain about COM add-ins?

Answer: COM add-ins are software program`s which are integrated into an application and they add already built in features to an existing application. They have common architecture across multiple applications which help in deploying applications much faster across varied applications. Microsoft 2007 supports various COM add-INS Source:
Question: State some general uses for Visual basic applications in general context?

Answer: Visual basic can be used within almost all Microsoft products such as Map point, Visio, Auto cad, Word perfect, ArcGIS, word, excel, etc. With VBA you can control many functions such as host application, menus, toolbars, user interface, import and export of files, data transfer and extraction from multiple interfaces. Source:
Question: Explain about visual basic and its importance?

Answer: Microsoft holds license for Visual basic applications and it has been developing that language. Visual basic applications have an embedded programming environment which assists programmers in developing custom solutions by using almost all features of visual basic. Applications which are currently hosting visual basic can fully utilize the power of Visual basic applications because they have an added functionality and ease of visual basic applications. Source:
Question: What methods are called from the ObjectContext object to inform MTS that the transaction was successful or unsuccessful?

Answer: setabort and setcomplete Source:
Question: What does Option Explicit refer to?

Answer: Option Explicit makes the declaration of Variables Mandatory Source:
Question: What is the difference between Msgbox Statement and MsgboxQ function?

Answer: MsgBox is a built in VB function which displays a Message Box and MsgBoxQ is a function defined by the user. Source:
Question: To set the command button for ESC, Which property needs to be changed?

Answer: set cancel property to true

Ex: button1.cancel = true
Question: 3 main differences between flexgrid control and dbgrid control

Answer: 1. Datagrid is Editable, flexgrid is Diplay only.

2. DBGrid allows full data binding while MSFlexGrid allows read-only binding

3. MSFlex grid is smaller and allows cell merging while Datagrid is larger and does not allow cell merging
Question: Explain about function pointers?

Answer: Visual basic applications have very rich and flexible applications but there is one limitation when using pointer function. Windows API has limited support for function pointers because it has the ability to use but not the functional support to call back the function. But later versions have support for modules. Function pointers have inbuilt support (DLL`s) for call but not for call back. Source:
Question: What forms should be used for Complex user Input?

Answer: Userforms should be used for complex user input. When an application input has non text as an input it is advisable to use Userforms rather than the input boxes. When you are using Userforms a user can give input any number of times which is not the case when you use input boxes. This can be accessible from the insert menu in your VBA editor after which you can insert your code. Source:

1 2 Next

India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.03125 Seconds