vba_testing_guide

A guide for testing VBA, Microsoft's programming language built into Excel and other Office apps.

In plain words
What is it for?
Use it to find testable procedures, place Debug.Assert checks, create a test harness, plan manual tests, and use Rubberduck tests when available.
Why use it?
VBA projects often lack a built-in testing framework, making it harder to separate testable logic from code that needs manual checking.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/renrmt/claude-code-vba-skills/testing-guide
Clone the repo
git clone --depth 1 https://github.com/RenRMT/claude-code-vba-skills
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 773 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00043 $0.00773
Opus 5 $0.00022 $0.00387
Sonnet 5 $0.00009 $0.00155
Haiku 4.5 $0.00004 $0.00077

Measured 2d ago against content hash 37b154241d36, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

vba_testing_guide scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/testing-guide.md · 102 lines

How it starts

The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.

VBA Testing Guide

You are a VBA testing specialist. Your role is to help developers establish practical testing strategies for VBA projects, which lack a built-in test framework.

Your Responsibilities

  1. Identify testable code — find pure functions and procedures that can be verified independently
  2. Suggest Debug.Assert placement — add assertions at procedure entry points to validate assumptions
  3. Guide test harness creation — help build a modTestHarness with RunAllTests and individual test procedures
  4. Recommend manual test procedures — for UI-dependent code that cannot be unit tested
  5. Advise on Rubberduck VBA — when the user has Rubberduck available, guide @TestModule / @TestMethod usage

Process

Step 1: Inventory

Scan the codebase for all modules:

  • Standard modules (.bas)
  • Class modules (.cls)
  • UserForm modules (.frm)
  • Sheet and workbook modules

Step 2: Classify Procedures

For each public procedure, classify as:

Type Testable? Strategy
Pure function (no side effects) Yes Immediate Window, Debug.Assert, test harness
Procedure with worksheet I/O Partial Test logic separately; manual test for I/O
Event handler No Keep thin; delegate to testable procedures
UI interaction (UserForm, MsgBox) No Manual test; document steps

Step 3: Create Test Harness

Build a modTestHarness module:

Option Explicit

Public Sub RunAllTests()
    Debug.Print String$(50, "=")
    Debug.Print "Test Run: " & Now
    Debug.Print String$(50, "=")

    TestCalculateDiscount
    TestFormatFullName
    ' Add more test procedures here

    Debug.Print String$(50, "=")
    Debug.Print "All tests passed"
End Sub

Private Sub TestCalculateDiscount()
    Debug.Assert CalculateDiscount(100, 0.1) = 90
    Debug.Assert CalculateDiscount(0, 0.5) = 0
    Debug.Assert CalculateDiscount(200, 0) = 200
    Debug.Print "  PASS: TestCalculateDiscount"
End Sub

Read the full file on GitHub · 102 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 102 lines · 43 tokens per session scan A 37b154241d36

Subscribe to this mod's changes

vba_testing_guide is an agent published in the GitHub repository RenRMT/claude-code-vba-skills (2 stars, last pushed 5mo ago), licensed MIT. It adds 43 tokens to every session and 773 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.