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.



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


    Related pages

    vba sort columnconcatenate excel formulasvba excel dynamic arrayvba delete filesddl & dmlconcatenate vba excelvlookup codehow to extract data from multiple excel worksheetsexcel vba dashboardhow to connect excel to sqlhow do i unhide cells in exceleffort estimation template for software developmentselect sheet excel vbalen in excelexcel deduplicationexcel formula to remove charactersvba enableeventshow to remove unwanted rows in excelexcel to csv converterhow to unlock cells in excel 2007object oriented vbaexcel copy cell contentsbypass excel passwordvba case ishow to unprotect a workbookvba mergeapplication in vbavba listbox multiple columnsvba if statementssumif formulasms excel basics tutorialdifference between two dates in excelvba vbokcancelvba code msgboxwriting an if statement in excelexcel remove duplicate columnsexcel task templatehow to delete extra pages in exceladodb recordset vba excelexcel vba database examplesexcel scheduling templatelearn vlookup in excel 2013comment in excel vbaend xlupvba entirecolumnexcel formulas pdf with example 2007 in hindiaccess vba programming examplesvba uppercasedata validation in excel 2010excel 2007 formulas with examplesvba delete rowsunlock protected excelvb programming examplesvba connection stringvba deletemultiple if statement in excelvba coding basicsvbscript message box numbered list and valuesaccess query vbavba empty cellexcel change background color based on valuehow to unhide columns in excel 2010activate sheet vbaexcel sharing workbookvba excel 2007how to protect a excel sheetautomation testing interview questions and answers pdf free downloadsql objective type questions and answers pdfclear array vbaexcel developer option