Runtime Error 459: “This component doesn't support the set of events,” explained and fixed

Error 459, “This component doesn't support the set of events”, fires when code declares a variable WithEvents and assigns an object whose component does not provide the event interface the declaration expects. Event handling in VBA is a contract: the component must expose a source interface with those events, and the class of the variable must match it. A component that exposes no events, or a different set than the code was written against (typically after a version change), cannot be wired up, and the assignment raises error 459.

For people who just run the program

  1. Expect it after component upgrades. A control or library whose events changed between versions breaks the projects wired to its old events, with this error at start-up.
  2. Reinstall matched versions. The project and the component must agree on the event set; the vendor's installer for the version the tool was built against is the fix, not a hunt for individual files.
  3. Note what changed on the machine. As with its neighbors 429 and 430, the install history is the substance of the report.
  4. Nothing in documents or data is implicated. The failure happens when the program wires up its components, before any data is touched.

For people who write the code

  1. Verify the component actually sources events. Not every creatable class raises events. In the Object Browser, a WithEvents-compatible class shows its events (lightning-bolt members) and its default source interface; if there are none, no declaration can sink them.
  2. Rebind after version changes. When a component's version changes, the event interface is identified by a GUID that may have changed too. Removing and re-adding the reference, then recompiling, rebinds the WithEvents declaration to the interface that actually exists.
  3. ' In a class or form module:
    Private WithEvents engine As Vendor.Engine
    ' Assignment raises 459 if Vendor.Engine (as registered)
    ' does not expose the event source interface this expects.
    Set engine = New Vendor.Engine
  4. Consider callback-free designs for fragile components. Where a component's event support is unreliable across versions, polling a status property from a timer is uglier but version-tolerant. Reserve WithEvents for components whose event contract you control or can pin.
Errors 429, 430, and 459 are a version-mismatch family. When one appears, check versions and registration before touching code logic. Hours are lost debugging event handlers for what turns out to be the wrong build of a control registered on the machine.

If it still happens

If the version is pinned and the interface is right, check for a class that implements events conditionally: some components expose events only in their full (licensed/design-time) mode and not in the run-time redistributable, or only when created one specific way. The vendor's redistribution notes govern which creation path carries the event interface.

Common questions

What does “support the set of events” mean? A component publishes a fixed set of events it can raise (its source interface). WithEvents variables subscribe to that set. If the component does not publish the set the code expects, the subscription cannot be made, which is error 459.

Can a form's built-in controls raise error 459? Controls placed at design time have their events wired by the designer, so 459 in practice concerns components assigned in code through WithEvents variables, typically external libraries and classes.

Related errors

Runtime Error 429 · Runtime Error 430 · Runtime Error 440