
VBA Set in Excel — Why Object Variables Need Set (and Errors 91 and 424)
VBA Set assigns a reference to an object variable, because an object variable is a label that points at a thing, not a box that holds one. Skip Set on an object and you get run-time error 91, Object variable or With block variable not set; use Set on something that is not an object and you get error 424, Object required. This guide covers the mental model of reference versus value, why Range, Worksheet and Dictionary need Set while Integer and String do not, how Set aliases two variables onto the same live object, and how to read the two most common VBA runtime errors.





























































































































































