Error 438 means the object is real, but the member being used on it isn't: the code called a property or method that this kind of object doesn't offer. It's the object-oriented cousin of a spelling error — with two extra causes: the variable holds a different object than the code assumes, or the Office version in use genuinely lacks that member.
Range where a Worksheet was assumed, a Workbook method used on a Sheet. The member exists — on the other object.As Object or Variant skip IntelliSense and compile checks, letting wrong members through..Value2 vs .Value, worksheet functions vs VBA methods, Cells vs Range habits imported from another object model (Word code used in Excel is a classic).? TypeName(myVar). Half of all 438s end here — the object isn't what the code believes.Dim ws As Worksheet) and reference the library (Tools → References). IntelliSense then lists only real members, and the compiler catches wrong ones before runtime.Sort lives on Range, not Worksheet; knowing the owner is the fix.Isolate the call in the Immediate window against a known object: create the object fresh (Set x = Worksheets(1)) and try the member there. If it works, the original variable's content is the problem; if it fails identically, the member truly doesn't belong to that object in this version — and the documentation for your exact Office version is the referee.
What's the difference between 438 and 424/91? 424/91 mean the variable holds nothing at all. 438 means it holds a real object — just not one that offers the member being used. TypeName() distinguishes them in one line.
Why did it compile fine if the member doesn't exist? Late binding. With Object/Variant variables, VBA defers member checks to run time by design — flexibility bought with exactly this error.