Error 424 — “Object required” — means the code tried to use an object — call a method, read a property — but the variable it used contains no object. Usually it's empty because a Set was skipped, a name was misspelled, or an assignment earlier in the macro quietly produced Nothing.
In VBA, object variables are references — labels pointing at things. ws.Name asks the thing labelled ws for its name. If the label points at nothing (the technical term is Nothing), there is nothing to ask, and VBA raises 424. Compare error 91 (“Object variable not set”) — its close cousin, raised in slightly different circumstances.
Set. ws = Worksheets("Data") tries to assign the sheet's default value, not the sheet. Object assignments require Set ws = Worksheets("Data").Option Explicit, VBA silently creates a brand-new empty variable with the wrong-spelled name, and it contains nothing.Find returned Nothing — the result was used immediately without checking (a Find that found no match is the classic).Option Explicit at the top of every module. It turns silent misspellings into an immediate, honest “Variable not defined” at compile time. (Turn it on permanently: VBA editor → Tools → Options → “Require Variable Declaration.”)Set where an object is assigned. Any line putting a worksheet, workbook, range, or collection into a variable needs it.Set found = Range("A:A").Find("Total")
If Not found Is Nothing Then found.Offset(0, 1).Value = "x"? ws Is Nothing for each object on the line. The one that answers True is the empty label — trace where it was supposed to be assigned.Work backwards from the empty variable: find every line that assigns it, and put a breakpoint on each. The assignment either never runs (a skipped branch), runs and produces Nothing (a failed lookup), or runs before the object exists (ordering — a form not yet loaded, a workbook not yet opened). One of those three is always the story.
What's the difference between error 424 and error 91? Both mean “this object variable is empty.” 91 usually fires when a variable was never assigned at all; 424 when an unassigned or Nothing variable is used where an object is required. The fixes — Set, spelling, Nothing checks — are the same.
Why did adding Option Explicit “break” old macros? It didn't break them; it exposed names that were always misspelled. Fix each flagged name to match its declaration and the macro runs as intended — often better than before.