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


"We are impressed with Interview Mocha's comprehensive IT skill test batteries and their ability to provide tailor-made assessments quickly. The results we got from Interview Mocha exceeded our expectations, employees found the tests quick, fun, and a benchmark of their knowledge."

Ajay Garg, Siemens,
Associate Manager

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

    • 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"


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

    • 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


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

    • 2 1

    • 2 2

    • 1 1

    • 1 2

    • 2; 2

    • 1; 1

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 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...

Related Tests

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates