Top 100+ Vba For Excel Interview Questions And Answers
Question 1. Explain About Visual Basic And Its Importance?
Answer :
Microsoft holds license for Visual simple programs and it's been developing that language. Visual simple applications have an embedded programming surroundings which assists programmers in growing custom answers by using almost all capabilities of visible primary. Applications that are presently hosting visual basic can completely make use of the electricity of Visual fundamental programs because they have got an added capability and simplicity of visual primary applications.
Question 2. State The Difference Between Visual Basic, Vb Script And Visual Basic Applications?
Answer :
Visual primary is beneficial if you are planning to develop your packages from scratch. This language helps you in developing Active x controls, exe files, and so on.
Visual script is a powerful tool, through which you could create small scale programs on net pages, automation programs, etc. Integrated development surroundings isn't always present for VB script.
Visual fundamental applications are very beneficial in automating your existing application. VB software is useful for growing already existing applications.
Microsoft Excel Interview Questions
Question 3. Name The Platforms Through Which Visual Basic Applications Are Available?
Answer :
Most of the visible fundamental programs are available on 32 bit Intel structures. These packages also run on a few of the windows software program systems which includes server 2003, XP, Vista, and many others.
Question four. Define And Explain About Com Add-ins?
Answer :
COM upload-ins are software program application's that are integrated into an application and that they add already constructed in functions to an present software. They have commonplace structure throughout multiple packages which help in deploying packages tons quicker throughout various applications. Microsoft 2007 helps numerous COM add-INS.
VBA For Excel Tutorial
Question five. How Best Can A Programmer Utilize The Benefits Of Vba With Office (07)?
Answer :
Microsoft office 2007 supports Visual simple and has help with many diverse functions. With MS workplace 2007 you can use laptop applications for developing tailored enterprise answers. These computing device applications may be used immediately as construction web sites.
Microsoft Word Interview Questions
Question 6. Explain About The Security Vulnerabilities For Vba?
Answer :
Microsoft Visual simple has its host of troubles one such being macros, Macros can be created that could create a havoc for a programmer with suitable intentions. Also the safety issue rests within the hands of the user and no longer the programmer as such. A person can manage the VBA report.
Question 7. Explain About Line Option Explicit?
Answer :
Line express characteristic makes the compiler to identify all the variables which aren't special by the dim announcement. This command appreciably reduces the problem of kind mistakes. This is used notably due to the fact VBA offers with records rich programs in ?which sort errors are commonplace.
Microsoft Excel Tutorial Microsoft Powerpoint Interview Questions
Question 8. Give Technical Reasons Which Made Microsoft Withdraw Its Support For Vba In Mac?
Answer :
The reasons which made Microsoft drop its support to VBA are as follows, Microsoft visual basic is based closely on gadget code which turned into written for Power PC structure. Also it would take any other years for growing VBA support for its architecture. It also states that Microsoft will contain VBA in the next script of office launch for Mac.
Question nine. How Can You Format Expressions By Using Vba?
Answer :
Format features may be used to format the various expressions together with currency, time, date, chances and numbers. These features are a great deal less complicated to apply in VBA. User described date, numeric and string formats are present in the various packages.
Microsoft Entity Framework Interview Questions
Question 10. How Do You Use The Getsetting And Savesetting Functions To Read And Write Registry Settings?
Answer :
A laptop registry can be used to store configuration settings and alertness initialization. We can use Getsetting characteristic to examine registry settings and save settings function to write registry settings. Application call, segment, key, setting, and default are to be specified for registry editing. It is advisable to understand about your pc settings earlier than modifying registry settings.
Microsoft Word Tutorial
Question 11. What Forms Should Be Used For Complex User Input?
Answer :
Userforms must be used for complex consumer enter. When an application enter has non text as an input it is recommended to use Userforms as opposed to the input containers. When you're using Userforms a user can provide input any wide variety of instances which isn't the case whilst you use input bins. This may be available from the insert menu in your VBA editor and then you may insert your code.
Microsoft Azure Interview Questions
Question 12. Explain About Function Pointers?
Answer :
Visual fundamental programs have very wealthy and flexible packages but there is one drawback when the usage of pointer feature. Windows API has restricted assist for characteristic suggestions because it has the ability to use however not the practical help to name lower back the feature. But later variations have aid for modules. Function hints have in-built assist (DLL's) for name however now not for name returned.
Microsoft Excel Interview Questions
Question thirteen. State Some General Uses For Visual Basic Applications In General Context?
Answer :
Visual simple can be used within almost all Microsoft products along with Map factor, Visio, Auto cad, Word best, ArcGIS, phrase, excel, and so forth. With VBA you can manipulate many functions which include host utility, menus, toolbars, person interface, import and export of documents, statistics transfer and extraction from multiple interfaces.
Microsoft Powerpoint Tutorial
Question 14. Explain About Insert Module And Goal Seek Functions Present In Vba?
Answer :
The chief use of VBA is to utilize its unique characteristic which facilitates in repeated movements. Goal are seeking for feature helps to lessen guide access of the code each and every time. This solves the trouble of repeated feature entry via automating functions and actions. Sub routines are inserted into the the use of the VBA editor and command insert module.
Question 15. How Can We Use Data Validation Function In Vba?
Answer :
Data validation is an crucial idea in VBA. Application technique and a custom conversation container can be used to correct enter mistakes. You can assign an utility process to the body of a dialog container. Error message or custom dialog box can be highlighted with the primary field with errors.
Microsoft Project Interview Questions
Question sixteen. How Can We Dial A Phone Number?
Answer :
Shell command present in VBA can be used to begin the dialer found in home windows working machine. Phone quantity may be used to connect to your modem. With the use of shell and sendkeys you can dial to your consumer. Shell starts offevolved home windows utility and sendkeys inform the window to dial in step with the keystrokes of the utility. A macro can be used to begin the cardfile application which activates the car dialer characteristic.
Microsoft Entity Framework Tutorial
Question 17. What Is The Difference Between Byval And Byref And Which Is Default ?
Answer :
ByRef: If you bypass an issue by means of reference while calling a technique the system get right of entry to to the real variable in reminiscence. As a result the variable's value can be modified through the manner.
ByVal: If you bypass a controversy by means of fee when calling a process the variable's fee may be changed with within the technique only out of doors the actual value of the variable is retained.
ByRef is default: Passing by means of reference is the default in VBA. If you do not explicitly specify to bypass an argument through fee VBA will pass it by reference.
Excel Data Analysis Interview Questions
Question 18. What Is The Meaning Of Option Explicit And Option Base?
Answer :
Option Explicit makes the statement of Variables Mandatory while Option Base used at module degree to claim the default lower bound for array subscripts. For eg. Option Base 1 will make the array decrease bound as 1 rather than zero.
Microsoft Word Interview Questions
Question 19. What Are Various Data Type And Their Size?
Answer :
The Boolean statistics kind has only two states, True and False. These types of variables are stored as sixteen-bit (2 Byte) numbers, and are commonly used for flags.
The Byte facts kind is an eight-bit variable which could shop cost from 0 to 255.
The Double statistics type is a 64-bit floating factor quantity used while high accuracy is wanted.
The Integer statistics kind is a 16-bit quantity which can range from -32768 to 32767. Integers have to be used when you are running with values that can't comprise fractional numbers. In case, you're working over 32767 rows use Long as facts type.
The Long statistics type is a 32-bit number that may variety from -2,147,483,648 to 2,147,483,647.
The Single information type is a 32-bit wide variety starting from -three.402823e38 to -1.401298e-45 for negative values and from 1.401298e-45 to 3.402823e38 for high quality values. When you need fractional numbers inside this range, that is the facts kind to use.
The String records kind is normally used as a variable-period type of variable. A variable-duration string can comprise as much as about 2 billion characters. Each character has a cost ranging from zero to 255 based totally at the ASCII individual set.
Microsoft Azure Tutorial
Question 20. Difference Between Activeworkbook And Thisworkbook.
Answer :
ThisWorkbook refers to the workbook in which code is being written even as ActiveWorkbook refers back to the workbook that is in lively nation with energetic window. In case of simplest one workbook open, ActiveWorkbook is same as ThisWorkbook.
Excel pivot tables Interview Questions
Question 21. Code To Find A Last Used Row In A Column Or Last Used Column Of A Row.
Answer :
Last Row in a column may be locate the use of End(xlUp) and Last Column in a row may be discover the use of End(xlToLeft). For e.G. Range("A1048576").End(xlUp).Row offers closing used row of Column A.
Question 22. Difference Between Activex And Form Controls.
Answer :
Forms controls can be used on worksheets and chart sheets. Forms controls also can be placed within embedded charts in Classic Excel (though not in Excel 2007). ActiveX controls can simplest be used on worksheets. ActiveX controls do now not work in MacExcel.
The Forms controls aren’t very complicated, and that they were a part of Excel for longer (they have been utilized in Excel 5/ninety five’s dialog sheets) than the Controls Toolbox (Excel 97), so it stands to purpose that they’d be more seamlessly incorporated. Being newer, the ActiveX controls have richer formatting opportunities. Both can link to cells and degrees in the worksheet.
Microsoft Project Tutorial
Question 23. What Is The Difference B/w Functions And Subroutines?
Answer :
Subroutines never go back a value however features does return values.
A feature couldn't exchange the values of real arguments whereas a subroutine may want to exchange them.
Excel Power View Interview Questions
Question 24. How To Debug A Vba Code?
Answer :
Using Breakpoints(F9), Step-with the aid of-step execution (F8), Debug.Print & Immediate Window and Watch window.
Microsoft Powerpoint Interview Questions
Question 25. Draw Basic Excel Object Model?
Answer :
Application --> Workbooks --> Worksheets --> Range / Chart.
Advanced Excel Charts Tutorial
Question 26. Can You Lock Cells Such That Only Specific Users Can Modify Them?
Answer :
There is a option "Allow users to edit stages" may be used for this reason.
Microsoft Interview Questions
Question 27. How Can You Add A Drop-down List To A Cell So The User Can Choose A Value From The List?
Answer :
Using 'Data Validation'.
Microsoft Entity Framework Interview Questions
Question 28. How Can You Increase The Number Of Rows In A Worksheet?
Answer :
No one can not. They're constant as 65536(2^sixteen) in Excel 2003 or earlier than and 1048576(2^20) in Excel 2007 & Excel 2010.
Advanced Excel Functions Tutorial
Question 29. How Can You Increase The Number Of Columns In A Worksheet?
Answer :
No one can not. They're constant as 256(2^8) in Excel 2003 or before and 16384(2^14) in Excel 2007 & Excel 2010.
Question 30. How Will You Distribute A Workbook Such That It Can't Be Copied Using Macro Or Anything?
Answer :
We can create a workbook which cannot be changed however can't create a workbook which can not be copied.(It relies upon on device security, it has not anything to do with Excel or VBA)
Question 31. What Types Of Workbook Protection Are Available?
Answer :
Excel offers 3 approaches to defend a workbook:
Require a password to open the workbook.
Prevent users from including sheets, deleting sheets, hiding sheets, and unhiding sheets.
Prevent customers from changing the dimensions or function of home windows.
Excel Dashboards Tutorial
Question 32. The Font Dialog Box Allows You To Select Different Fonts, Their Style, Their Size, And Some Other Special Effects. How Do You Bring Up This Font Dialog Box?
Answer :
Use Application.Dialogs(xlDialogFont).Show or Application.Dialogs(xlDialogFormatFont).Show to load font conversation container from Excel VBA.
Question 33. What Is Ado, Oledb & Odbc?
Answer :
ADO : ActiveX Data Objects is ordinary information access framework that encompasses the functionality of DAO.
ODBC : Open Database Connectivity(ODBC) is a windows generation that lets a database patron application connect to a outside database.
OLEDB : Low level programming interface designed to get admission to a huge type of information get entry to Object Linking and Embedding (OLE).
Microsoft Azure Interview Questions
Question 34. How To Set The Custom Paper Size In Excel Object Through Vb?
Answer :
Activesheet.PageSetup.PaperSize = xlPaperLetter (Similarly xlPaperA4 or xlPaperLegal and many others.).
Question 35. What Is The Method For Returning More Than One Values From A Function In Vb?
Answer :
Any of the three strategies may be used:
Create a class with the homes you require to go back and then go back the object of the magnificence from the function.
Using ByRef for the values.
Return an array of the values.
Question 36. Does Vba Supports Oop Principles?
Answer :
Yes because VBA is VB6.0 based totally that is an Object Based Programming Language and is also referred to as 'Event Driven Programming' and it supports Polymorphism, Encapsulation and partially Inheritance.
Microsoft Project Interview Questions
Question 37. To Set The Command Button For Esc, Which Property Needs To Be Changed?
Answer :
Set Cancel property of Button to True at the Form.
Question 38. What Is Type Library And Its Purpose?
Answer :
Type libraries are documents that explicitly describe a few or all of the contents of components. This consists of information approximately the strategies houses constants and different individuals exposed by the thing. Development gear which includes Visual Basic make use of the facts contained within the kind library to help you as a developer get right of entry to and use the thing. In addition kind libraries offer a convenient manner to consist of a easy stage of descriptive documentation for issue contributors. You can use them thru 'Tools --> References' in VBE.
Question 39. What Is A Volatile Function?
Answer :
Volatile functions are a kind of feature in an effort to continually recalculate. That method whenever Excel needs to calculate any a part of the worksheet, those cells containing volatile features may even calculate.
Question 40. How Do You Make A Udf Volatile?
Answer :
By including Application.Volatile declaration to it. It should be the primary line of your User Defined Function.
Excel Data Analysis Interview Questions
Question forty one. Is It Possible To Apply 'application.Risky(fake)' To A Volatile Public Function Like Index And Make It Not Volatile?
Answer :
Actually INDEX isn't always a unstable characteristic, despite the fact that a few MicroSoft documentation says it's far. Anyway no its no longer possible to use Application.Volatile(False) to a built-in Excel characteristic except via duplicating what the integrated feature does inside a UDF.
Question forty two. What Is Excel Dependency Tree?
Answer :
Dependency timber are excel manner of minimizing the calculation with the aid of monitoring what has modified because ultimate calculation. It lets in Excel to recalculate best:
Formulae/Names which have changed.
Formulae containing Volatile Functions.
Formulae dependent on modified or unstable formulae or cells or names.
Excel determines dependencies by using searching at the cells referred to by using each formula and through the argument list of every function.
Dependency bushes are right away updated each time a method is entered or modified.
To pressure the dependency timber to be rebuilt and all formulae calculation use CTRL+ALT+SHIFT+F9.
Excel pivot tables Interview Questions
Question 43. How Do You Check The Calculation State ?
Answer :
using the Application.CalculationState belongings which tells if calculation has completed ( xlDone ), is pending ( xlPending) , or is in procedure ( xlCalculating ).
Question 44. What Are Excel Dependency Tree Limits?
Answer :
There are limits to the quantity of dependencies that Excel variations previous to Excel 2007 can music earlier than it ought to do complete calculations instead of recalculations.
The variety of different areas in a sheet that can have dependencies is confined to sixty five,536.
The quantity of cells that could depend upon a single location is restrained to 8K.
After the workbook has passed those limits, Excel no longer tries to recalculate best modified cells. Instead, it recalculates all cells at each calculation.
Question 45. What Do You Know About The Interpretation Features Of Vba?
Answer :
VBA is certified to Microsoft and this compatible with and handiest Microsoft merchandise. Code written is compiled via an intermediate language called P-code and this is stored in hosting applications consisting of Excel, Word and Access. The intermediate code is interpreted by a virtual system. This code and intermediate language is the exclusive right of Microsoft.
Question 46. What Is The Difference Between Usedrange And Currentregion Properties ?
Answer :
The modern area is a range bounded by using any mixture of blank rows and blank columns.
This assets is beneficial for lots operations that mechanically enlarge the choice to consist of the whole contemporary place, including the AutoFormat method. This belongings cannot be used on a protected worksheet.
The UsedRange belongings is used to pick the variety of used cells on a worksheet. It returns a Range object that represents the used variety on the required worksheet.
Every non-clean cellular were given its CurrentRegion and its keyboard shortcut is Ctrl+Shift+Spacebar.
There may be many present day regions however there's best one used range in a worksheet.
Question 47. Which Are The 2 Macro Languages And Which Do You Use ?
Answer :
XLM (utilized in Excel 97 or before) and VBA(used for 2000 and after). Obviously, VBA is in use nowadays.
Question 48. What Is View Port?
Answer :
The region under which the box presents the view of the ActiveX Document is referred to as a view port.
Question 49. What Is The Size Of The Variant Data Type?
Answer :
The Variant facts type has a numeric garage length of sixteen bytes and might comprise statistics up to the variety of a Decimal, or a individual garage size of 22 bytes (plus string period),and might shop any individual textual content.
Question 50. What Are The Different Types Of Error?
Answer :
Syntax Errors, Runtime , Logic.
Question fifty one. Can We Create Cgi Scripts In Vb?
Answer :
Yes.
Question 52. What Are The Different Types Of Dialog Box?
Answer :
Predefined, Custom, User Defined.
Question fifty three. What Are The Scopes Of The Class?
Answer :
Public, private, Friend.
Question 54. What Is The Difference Between Property Get, Set And Let?
Answer :
Set Value is assigned to ActiveX Object from the shape. Let Value is retried to ActiveX Object from the shape. Get- Assigns the cost of an expression to a variable or property.
Question 55. What Are The Type Of Validation Available In Vb?
Answer :
Field, Form.
Question fifty six. What Is Mapi ?
Answer :
Messaging Application programming Interface.
Question 57. What Are The Style Properties Of List Box?
Answer :
Simple Single Select , Extended, Multiple Select.
Question fifty eight. What Is The Tool Used To Configure The Port Range And Protocols For Dcom Communications?
Answer :
DCOMCONFIG.EXE.
Question fifty nine. Which Controls Cannot Be Placed In Mdi?
Answer :
The Controls which do now not have Align belongings can't be placed on MDI Form.
Question 60. What Is The Dll Required For Running The Vb?
Answer :
Vbrun300.Dll.
Question 61. Under The Ado Command Object, What Collection Is Responsible For Input To Stored Procedures?
Answer :
The Parameters series.
Question sixty two. What Are Some Benefits Of Using Mts?
Answer :
Database Pooling, Transactional operations, Deployment, Security, Remote Execution.
