{
  "id": 7340216,
  "title": "I stopped pasting VBA into a chatbot and pointed the agent at the actual workbook",
  "url": "https://urgent.news/2026/09/14/i-stopped-pasting-vba-into-a-chatbot-and-pointed-the-agent-at-the",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-14T15:03:51.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/noam_brand_e9641722eccabc/i-stopped-pasting-vba-into-a-chatbot-and-pointed-the-agent-at-the-actual-workbook-aen"
  },
  "original_language": "en",
  "account": "When people attempt to use AI to fix macro code, they often find themselves in a frustrating loop. They open the VBA editor, copy the subroutine, paste it into a chat window, describe the problem, receive a response, paste the answer back, and run the code again. This process is inefficient and error-prone, as the AI is essentially acting as the integration layer, handling compilation, testing, and debugging. The issue lies in the fact that most VBA code is embedded within workbooks, and its behavior depends on various factors such as the object model, enabled references, sheet names, and the current state of the Excel instance. When the code is pasted into a chat window, all this context is lost, and the AI can only make guesses, leading to incorrect code and difficult debugging.\n\nThe solution lies in letting the AI run the code directly against the actual workbook and modules. Instead of relying on an assistant that merely talks about the code, one should use an AI agent that can access the real modules and workbook, write and test the code, and provide the results and differences. This approach eliminates the need for manual copying and pasting, and allows the AI to work with the actual data and runtime environment. By closing the loop and having the AI interact with the project files directly, it becomes possible to make accurate changes to complex VBA codebases, even for legacy, large-scale workbooks. The author built a tool called VBridge, which runs Claude Code against the actual Excel VBA project on the user's machine, providing a practical solution to this problem.",
  "summary": "Here is the loop most people are stuck in when they use AI to fix a macro. Open the VBA editor, copy the sub out, paste it into a chat window, describe the problem, paste the answer back, run it, watch it throw error 1004 on some object it never saw, copy the error back, and go again. It works, sort of, but you are the integration layer. You are the clipboard, the compiler, and the test harness,…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}