Getting started with VBDepend

Getting Started with VBDepend



How do I analyze my VB6/VBA applications using VBDepend?


  • Run VisualVBDepend.exe.
  • Select the option: New project



  • Populate the data grid with your projects by using the browse button.



    VBDepend analyzes the following kind of applications:
    • VB6 projects(.vbp,.vbg),
    • VBA code of Microsoft Excel(.xls,.xlsm),
    • VBA code of Microsoft Access(.mdb,.accdb),
    • VBA code of Microsoft Word(.docm,.dot).
    • Important notice concerning the office applications
      VBDepend gets the VBA source code from the excel file using the object model, if it's not works as expected for office application, you have to go to the trust center and check if "Trust access to the VBA object model" is checked.
  • Click the "Run" button to analyze your projects and code source by VBDependConsole.exe
    This analysis will take a few seconds to a few minutes depending on the size of the projects.

  • Once the analysis done, the result is displayed in the VisualVBDepend.exe UI.


Go to top


What does the VBDepend report tell me about my code?


  • Application Metric: This section gives you an idea of the topology of your application.
  • Project Metric: This section gives you an idea of the size of each project within your application in terms of code line and others metrics.
  • VBDepend View: This section illustrates the size of your projects, types and methods in terms of code line.
  • Project Abstracness vs. Instability: This section illustrate the Abstracness/Instability principle explained in the projects metrics section.
  • Project Dependencies: This section shows all dependencies between project of your application in a table.
  • Project Dependency Diagram: This section shows all dependencies between projects of your application in a diagram
  • Project build order: This section gives you one of the possible build order for your projects. If a cycle exists in your projects dependencies graph, this section will report it.
  • CQLinq Queries and Constraints: This section reports default CQLinq constraints which have been violated. More about the CQLinq language and CQLinq constraints here. You can build your own CQLinq constraints with VBDepend.app.
  • Type Metrics: This section recaps type metrics in a table. A link to the documentation is provided for each metric.

Go to top


I want to go further to have a better control over my code


  • Understand metrics yielded by VBDepend and read recommendations.
  • Get a new understanding of your code by playing with the VBDepend panels. Modify the view with the Level and Metric combo boxes.
  • Tune your report thanks to the Output panel in the VBDepend.Project UI.
  • Learn CQLinq, adapt existing CQLinq code rules and create your own ones.
  • Integrate the VBDepend report in your daily build process.

Go to top