Tuesday, May 27, 2014

20 TOP Excel VBA Interview Questions and Answers pdf

Most frequently Asked VBA Interview Questions and Answers for freshers and experienced pdf free download

1) Explain about visual basic and its importance?
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.

2) State the difference between visual basic, VB script and visual basic applications?
Visual basic is useful if you are planning to develop your programs from scratch. This language helps you in developing Active x controls, exe files, etc.
Visual script is a powerful tool, through which you can create small scale applications on web pages, automation applications, etc. Integrated development environment is not present for VB script.
Visual basic applications are very useful in automating your existing application. VB application is useful for developing already existing applications.

3) Name the platforms through which visual basic applications are available?
Most of the visual basic applications are available on 32 bit Intel platforms. These applications also run on many of the windows software systems such as server 2003, XP, Vista, etc.

4) Define and explain about COM add-ins?
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

5) How best can a programmer utilize the benefits of VBA with office (07)?
Microsoft office 2007 supports Visual basic and has support with many various features. With MS office 2007 you can use desktop applications for creating tailored business solutions. These desktop applications can be used directly as construction sites.

6) Explain about the security vulnerabilities for VBA?
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.

7) Explain about line option explicit?
Line explicit function makes the compiler to identify all the variables which are not specified by the dim statement. This command significantly reduces the problem of type errors. This is used extensively because VBA deals with information rich applications in which type errors are common.

8) Give technical reasons which made Microsoft withdraw its support for VBA in Mac?
The reasons which made Microsoft drop its support to VBA are as follows, Microsoft visual basic relies heavily on machine code which was written for Power PC architecture. Also it would take another two years for developing VBA support for its architecture. It also states that Microsoft will incorporate VBA in the next script of office release for Mac.

9) How can you format expressions by using VBA?
Format functions can be used to format many of the expressions such as currency, time, date, percentages and numbers. These functions are much simpler to use in VBA. User defined date, numeric and string formats are present in many of the applications.

10) How do you use the Getsetting and Savesetting functions to read and write registry settings?
A computer registry can be used to store configuration settings and application initialization. We can use Getsetting function to read registry settings and save settings function to write registry settings. Application name, section, key, setting, and default are to be specified for registry modifying. It is advisable to know about your computer settings before modifying registry settings.

11) What forms should be used for Complex user Input?
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.

12) Explain about function pointers?
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.

13) State some general uses for Visual basic applications in general context?
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.

14) Explain about insert module and Goal Seek functions present in VBA?
The chief use of VBA is to make use of its special function which helps in repeated actions. Goal seek function helps to reduce manual entry of the code each and every time. This solves the problem of repeated function entry by automating functions and actions. Sub routines are inserted into the using the VBA editor and command insert module.

15) State about the interpretation features of VBA?
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.

16) How can we use data validation function in VBA?
Data validation is an important concept in VBA. Application procedure and a custom dialog box can be used to correct input errors. You can assign an application procedure to the frame of a dialog box. Error message or custom dialog box can be highlighted with the first field with errors.

17) How can we dial a phone number?
Shell command present in VBA can be used to start the dialer present in windows operating system. Phone number can be used to connect to your modem. With the use of shell and sendkeys you can dial to your user. Shell starts windows application and sendkeys inform the window to dial according to the keystrokes of the application. A macro can be used to start the cardfile program which activates the auto dialer feature.

18)  What is the difference between ByVal and ByRef and which is default ?
ByRef: 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.
ByVal: 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.
ByRef is default: Passing by reference is the default in VBA. If you do not explicitly specify to pass an argument by value VBA will pass it by reference.

19)  What is the meaning of Option Explicit and Option Base?
Option Explicit makes the declaration of Variables Mandatory while Option Base used at module level to declare the default lower bound for array subscripts. For eg. Option Base 1 will make the array lower bound as 1 instead of 0.

20)  What are various data type and their size?
i) The Boolean data type has only two states, True and False. These types of variables are stored as 16-bit (2 Byte) numbers, and are usually used for flags.
ii) The Byte data type is an 8-bit variable which can store value from 0 to 255.
iii) The Double data type is a 64-bit floating point number used when high accuracy is needed.
iv) The Integer data type is a 16-bit number which can range from -32768 to 32767. Integers should be used when you are working with values that can not contain fractional numbers. In case, you're working over 32767 rows use Long as data type.
v) The Long data type is a 32-bit number which can range from -2,147,483,648 to 2,147,483,647.
vi) The Single data type is a 32-bit number ranging from -3.402823e38 to -1.401298e-45 for negative values and from 1.401298e-45 to 3.402823e38 for positive values. When you need fractional numbers within this range, this is the data type to use.
vii) The String data type is usually used as a variable-length type of variable. A variable-length string can contain up to approximately 2 billion characters. Each character has a value ranging from 0 to 255 based on the ASCII character set.

More Interview Questions & Answers: Click Here
More Multiple Choice Questions: Click Here

No comments: