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 insertcall function vba excelexcel deduplicateradio buttons excelvba msgbox inputproject management timeline excel templateexcel record a macroapplication run vbaexcel programming for beginnershow to detect duplicate in excelcategories of sql commandsfor loop in vbaexcel 2010 how to remove duplicatesexcel consolidate sheets into onevba excel select cellmacro excel rangems outlook interview questionscombine multiple worksheets into oneif vlookup examplecool vbs codescreate hyperlink in excelexcel merge sheets into one workbookexcel templates timelineduplication in excelredim array vbawhat does vba mean in excelhow to remove empty columns in excelexcel if statement blankexcel vba application getsaveasfilenamevba code to connect to access database from excelpassword protect excel workbookselect cell macroremove workbook protectionexcel macro remove blank rowsms excel tutorials with examplescommand button vbasql ddl and dmlvba filedialog selecteditemsexcel 2010 unprotect sheetactivex control examplesas beginnervba end xlupexcel unprotect sheet password removervlookup macro excelexcel color templateif statements excellprogram excel macrosdownloadable schedule templatedevelopers tab excelvba programming languagecopy tabs in excelexcel vba modulesvba offset functionunprotect excel sheet passwordhlookup excel tutorialformula vbaexcel if isblank thenexcel vba replace functionvisual basic commands for excelhow to sort excel sheets alphabeticallyconsolidate function excelconcatenate in excel 2010excel vba form examplesvba selection.pastespecialvba filenameexcel advanced filter tutorialconditional macrosproject management templates in excelremove macros from excelvba excel delete rowworkbooks open filename vbaexcel vba range variablethissheet vbavba adodb.connectionhow to create a userform in excel 2010how to use pivot table in excel 2010 with examplevba color codeshlookup vs vlookup