Questions tagged [rubberduck]

Rubberduck is an open-source COM add-in project for the VBA/VB6 IDE written in C#. It extends the VBEs capacities through various toolwindows and adds a UnitTesting suite. Please submit bugs & feature requests to the GitHub issue tracker.

Rubberduck is an open-source COM add-in project for the VBA/VB6 IDE written in C#. Use this tag only for usage of Rubberduck, including questions about using and understanding the features listed below. Questions about the C# code of Rubberduck itself should be directed at the devs directly.


Rubberduck started with an idea in the VBA Code Review chatroom, is owned by Mathieu Guindon and RubberDuck, and is maintained by several senior VBA citizens on both Code Review and Stack Overflow.

Official website: http://www.rubberduckvba.com

GitHub repository: https://github.com/rubberduck-vba/Rubberduck


Goal

Make the experience of writing code in the VBE (the VBA/VB6 IDE) as enjoyable as possible, by turning VBA/VB6 development into a modern-day IDE experience with features that have, since the VBE's last update forever ago (citation needed), become standard tooling in pretty much every IDE out there.


Core Features

  • Enhanced navigation dockable toolwindows such as the Code Explorer (an enhanced Project Explorer that drills down to module members) and TODO Explorer, global and context-sensitive search tools such as find all references, find all implementations, or find symbol make it much easier to find anything and navigate there.
  • Unit testing makes it child's play to add test modules, implement test methods, and execute them.
  • Code Inspections locate (and fix) issues in VBA/VB6 code.
  • Code Metrics measure things like LoC count, cyclomatic complexity, nesting levels, etc.
  • Refactorings for extracting methods, renaming identifiers, and reordering and removing parameters and updating all call sites in a single operation.
  • Smart Indenter Rubberduck integrates a C# port of the popular Smart Indenter add-in.

See the repository's issues list for everything the project has on its plate.


Contribute!

Feel free to fork the project, and meet the core devs in the VBA Rubberducking chatroom.

35 questions
16
votes
1 answer

Rubberduck UI submenus are disabled

I've just installed the Rubberduck VBE add-in v2.0.11.2453 (MSIL) on Windows 10 OS. When I open a macro-enabled Excel workbook in Excel and launch the VBA editor, Rubberduck starts but all commands under the Rubberduck menu are disabled. What am I…
Jean-Marc Flamand
  • 939
  • 3
  • 10
  • 24
11
votes
1 answer

Are there configuration settings to remember docked toolwindow positions in the VBE?

I've just installed the Rubberduck add-in. If I configure my vbe windows so I can see your duck-windows it all looks lovely but when I restart Excel it is back the way it was before: is there a way around this so my configuration of the vbe…
whytheq
  • 34,466
  • 65
  • 172
  • 267
9
votes
1 answer

How can I deliver an Excel VBA app without Rubberduck TestModules?

I have been using the Rubberduck VBA Add-in. I want to "deliver" my Excel application without the Rubberduck Add-in in the References. How do you manage that? Is it possible to "hide" the TestModules and not compile them, for instance?
Ben
  • 93
  • 3
8
votes
1 answer

Using Rubberduck unit tests, how can I find out which one of multiple asserts failed?

I'm using Rubberduck to unit test my VBA implementations. When using multiple Asserts of the same kind (e.g. Assert.IsTrue) in one TestMethod, the test result is not telling me which of them failed, as far as I can see. Is there a way to find out…
Jörg Brenninkmeyer
  • 3,304
  • 2
  • 35
  • 50
7
votes
1 answer

How to unit test VBA code? - Two different pointers

I am working on this excellent tutorial, but in the end my first test is not passing, due to the fact that I can clearly see I am creating two different arrays (and pointers), and trying to compare them with one another. Now the tutorial from what I…
Alfa Bravo
  • 1,961
  • 2
  • 25
  • 45
7
votes
2 answers

Code inspection - Named Range Reference

After running the code inspections in Rubberduck 2.0.11.2453, there are 4 Range references that get tagged as: Member 'Range' implicitly references ActiveSheet The ranges in question are referring to Named Ranges. Is it necessary to qualify a…
Rdster
  • 1,846
  • 1
  • 16
  • 30
6
votes
1 answer

Rubberduck VBA Code Inspections: Member 'x' has a 'VB_VarHelpID' attribute with value '-1', but no corresponding annotation

I am developing an Excel VBA project using the "Worksheet abstraction\Worksheet Proxy" technique, described in the There is no worksheet article and followed-up in my question here. My VBA code is structured in the MVP design pattern and I have…
Yasen Simeonov
  • 180
  • 1
  • 8
6
votes
1 answer

How to set the Attribute VB_PredeclaredId using RubberDuck '@PredeclaredID

As a Rubberduck and OOP newbie I'm still learning how to use the software and take advantage of the programming techniques First time I saw about folder annotations (https://github.com/rubberduck-vba/Rubberduck/wiki/Using-@Folder-Annotations) it was…
Ricardo Diaz
  • 5,658
  • 2
  • 19
  • 30
5
votes
2 answers

Test Module VBA

i'm trying to write a test module to test one of the modules I wrote in VBA. In specific, I have a if statement I would like to trigger using the test module by giving the module/funtion the wrong initial parameters. The module/function I would like…
Kusi
  • 785
  • 1
  • 10
  • 21
5
votes
1 answer

How to manage a local git repository using Rubberduck

I'm using Rubberduck (Version 2.0.13) in combination with a local git repository for version control of my VBA project. Currently, I need to re-open the repository every time I start Rubberduck using Manage -> Open Existing Repository in the Source…
Jörg Brenninkmeyer
  • 3,304
  • 2
  • 35
  • 50
4
votes
1 answer

Remove Attributes on Rubberduck VBA

I'm just getting into using Rubberduck for my VBA applications. I came across a great post on adding attributes here: How to set the Attribute VB_PredeclaredId using RubberDuck '@PredeclaredID However, what if I want to remove the attribute? It…
4
votes
1 answer

Can RubberDuck test if a program ends?

I'm developing tests with RubberDuck, and would like to test MsgBox outputs from a program. The catch is that the program ends right after outputting the MsgBox - there's literally an "End" Statement. When running a RubberDuck test and using…
user1114
  • 1,071
  • 2
  • 15
  • 33
4
votes
2 answers

Rubberduck VBA: What can cause a Resolver Error?

Thank to this question : Rubberduck UI submenus are disabled, I know that I may have to hit the "Refresh button" to use RubberduckVBA. One of the error that can follow is apparently the "Resolver Error". What are the different cases in which such a…
Akita
  • 287
  • 2
  • 8
4
votes
2 answers

Can not see the add in after installing rubberduck?

I am new to rubberduck and have installed the latest version 2.0.11. After admin installed, I go to excel and check my com-addins and it does now show rubberduck there. I've check my programdata folder and yes, rubberduck is there with all files…
pokemon_Man
  • 902
  • 1
  • 9
  • 25
3
votes
1 answer

Properly handle Worksheet events when sheet's code-behind is implemented in a "proxy" interface+class

I am trying to further build on this excellent example, which already implements the best practices discussed in these very insightful RubberduckVBA.com articles: Abstracting away from the Excel workbook/worksheet through proxy classes; Utilizing…
Yasen Simeonov
  • 180
  • 1
  • 8
1
2 3