Basic VBA Interview Questions and Answers

Home/100+ VBA Interview Questions and Answers with Examples/Basic VBA Interview Questions and Answers

Basic VBA Interview Questions and Answers

Basic VBA Interview Questions will be asked generally for Freshers, or 1-2 year experienced people. Here are the most commonly asked Basic VBA Questions and Answers covered from Basics of VBA Programming.

PREMIUM TEMPLATES LIMITED TIME OFFER

ON SALE80% OFF

50+ Project Management Templates Pack
Excel PowerPoint Word

Advanced Project Plan & Portfolio Template
Excel Template

Business Presentations Templates Pack
PowerPoint Slides

20+ Excel Project Management Pack
Excel Templates

20+ PowerPoint Project Management Pack
PowerPoint Templates

10+ MS Word Project Management Pack
Word Templates


  • VBA stands for Visual Basic for Applications.
  • VBA is Programming language available in MS Office Tools.
Data types helps to declare Variables with specific data, this helps to VBA to know the type of the data and assign the memory based on the DataType of the Variable.
  1. Boolean
  2. Byte
  3. Currency
  4. Date
  5. Double
  6. Integer
  7. Long
  8. LongLong
  9. LongPtr
  10. Object
  11. Single
  12. String
  13. Variant
Variant data type is default data type and it can hold any type of data. This will allocate maximum memory to hold the Varian Type. We use Variant data-type when we dot know the type of the data or to accept the multiple data types in a single variable.
We can define variable in different levels:

  • Local Level: Variables which are defined with DIM statement in a procedure or functions
  • Module Level: Which are defined with DIM statement on top of a module, can be accessed in entire module
  • Global Level: Which are defined Public statement at top of any module, can be accessed in entire project.
  • Arrays are type of variables allows to store multiple data values in one variable. It can contain multiple Dimensions like 2-dimensions, 3-dimensions,etc.
    We can redefine the size of the array using REDIM statement. We use PARSE statement will to keep the previously stored data in the data.
    Group of one particular objects are called Collections. This helps to loop through each object in the collection. Example: Sheets collection helps to loop through each each in the Workbook.
    Constants are fixed to memory holders to assign any fixed value.
    • Objects: An Object is nothing but a class. And object can have Child Objects, Methods, Properties and Events.
    • Methods: Methods are procures or actions available for a particular object. Example, Close, Open, Save methods of Workbook Object.
    • Properties: Properties are characteristics of an Object. Example: Path, Name of Workbook Object.
    • Events: Events are triggers available for an Objects. Example, Workbook Open Event, Workbook Before Close Event.
    • Execution: Place the Cursor in a procedure and Press F5 to Execute
    • Step by Step Execution: Place the Cursor in a procedure and Press F8 to Execute the Program Step by Step
    • Toggle Breakpoints: Place the Cursor at the required statement and Press F9 to toggle the Breakpoint Printing in Immediate Window: Use Debug.Print to print in the Immediate Window
    • Executing in Immediate Window: Write your expression in the immediate window preceded by ? (question mark) and enter to execute the expression.
    • Press Esc Key to goto Debug Mode
    • Press Ctrl+ Pause Break Key to Skip from the Infinite execution.

    Here is the link for more VBA Interview Questions and Answers. These are explained for examples.
    100+ VBA Interview Questions

    LIMITED TIME OFFER

    Related pages


    unprotect sheet excel 2007basic vba programmingexcel dashboard kpiexcel 2007 developer tabexcel vba goto cellworking with macros in excelcalculate vba excelmacro excel insert rowhow do i autofit in excelcounting duplicates in excelexcel interactive dashboard templateexcel 2007 listboxaccess msgboxexcel templates for construction estimatingexcel vba activeworkbook.saveasdata control language dclvba for stepbest excel book for data analysissales dashboard excel templatelistbox selectedvba excel learnexcel vba application.waitif iserror functionapplication.worksheetfunction.vlookupvba activex controlsformula in vba excelusing macros excelpopulate combobox excelexcel commands with examplesexcel isnumber functionexcel vba worksheet namehow to build an excel macrovba sql wheretutorial on excel pivot tablesvba excel delete rowexcel vba programexcel vba cell formattingexcel to word vbafind duplicates excel 2010vba private functionhow to put password on excel 2007joining cells in excelcombining sheets in excelsas interview questions pdf free downloadddl dml dclexcel copy worksheet vbasample project timeline excelexcel to kml macroexample excel formulasproject timetable template excelisblank function excelhow to change the width of columns in excelcombine multiple worksheets into one worksheetexcel delete duplicateexcel vba scriptingvba new linemicrosoft excel 2007 exam questions and answersexcel if cell contains stringhide column in excelexcel 2010 unhide columnsrename file vbavba message box syntaxhow to remove duplicates in excel 2013excel macro free workbookunlock protected workbookactivesheet range autofilteradvanced if statements in exceldifferent types of languages in sqlhow to hide formula in excel 2007 without protecting sheetsubstitute formula in excelsql ddl dml dcl tcl commands with examplesvba macro in excelsas sql examplelookup excel examples