Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

Visual Basic Application Test

Topics Covered

  • Date and Time
  • Workbook
  • Worksheets
  • Range and cells
  • Objects and Variables
  • Array Creation and Management
  • Conditional Logic
  • Environment and System
  • Functions and Classes

Useful for hiring

  • VBA Developer
  • Software Developer - VBA

Start hiring job-fit candidates using this assessment

GET A DEMO

"We realized that to acquire quality talent, our recruitment process was in dire need of automation. Too many of our technicalteam were simply wasting hours conducting interviews that did not yield the desired results. For us the foremost criteria were to finda recruitment partner who could tick all the right boxes"

Rehana Nisar, Gartner,
Global Product & Services Recruitment Head
Question

To connect Excel with a 2010 access database, we used this type of connection string:

Answer
    • Provider=Microsoft.SQLOLEDB;DataSource=C:\Data.accdb;User Id=admin;Password=

    • Provider=Microsoft.Jet.OLEDB.4.0;DataSource=C:\Data.accdb;User Id=admin;Password=

    • Provider=Microsoft.Microsoft.ACE.OLEDB.12.0;DataSource=C:\Data.accdb;User Id=admin;Password=

    • Provider=SQLOLEDB;Data Source=;Initial Catalog=;User ID=;Password=;Trusted_Connection="

    • Provider=SQLOLEDB;Data Source=; Initial Catalog=;Integrated Security=SSPI"

Question

How to delete a file without raising errors in case the file doesn’t exist?

Answer
    • With CreateObject("Scripting.FileSystemObject")
      if .FileExists(sFile) then .Delete FullPathName
      End With

    • CreateObject("Scripting.FileSystemObject").Delete FullPathName

    • On Error GoTo 0: Kill FullPathName

    • If Dir(FullPathName) <> "" Then VBA.KillFullPathName

    • On error resume next
      With CreateObject("Scripting.FileSystemObject")
      if .FileExists(sFile) then .Delete FullPathName
      End With

Question

After Running main, what would be displayed in the immediate window?

Private a
Sub main()
    Dim b
    a = 1: b = 1
helper a, b
Debug.Print a; b
End Sub
Sub helper(ByVal a, ByRef b)
    a = 2: b = 2
End Sub

Answer
    • 2 1

    • 2 2

    • 1 1

    • 1 2

    • 2; 2

    • 1; 1

Test details:

VBA Test enables employers and recruiters to evaluate skills and job readiness of candidates. For this reason, the emphasis is laid upon evaluating the knowledge of applied skills gained through real work experience, rather than theoretical knowledge.

Test Details: 30 minutes 

20 Application Questions


The combination of Application and Theory questions helps to evaluate Technical as well as practical Skills of Candidates.

Test description:

VBA Test is useful to effectively assess the skills of candidates before an interview. VBA (Visual Basic for Applications) is an event-driven programming language from Microsoft that is predominantly used with Microsoft office applications such as MSExcel, MS-Word, and MS-Access. It is designed to check the development and programming skills. The test is created and validated by Subject Matter Experts. 

The VBA Test contains questions on following topics:  

  • Date and Time

  • Workbook, Worksheets, Range and cells

  • Objects and Variables

  • Array Creation and Management

  • Conditional Logic

  • Environment and System

  • Functions and Classes

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at support@interviewmocha.com to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...
GET A DEMO

Related Tests

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates

GET A DEMO