As a matter of interest, I have often gotten an error when using functions from the VBA Strings library (left, right, mid, etc.), when the missing reference is completely unrelated. That was the case here again, I see. It's as if the Strings library is like the canary in a coal mine that tells you when there is a reference-related compile error elsewhere in the code.