Quote Originally Posted by Paul_Hossler View Post
'1. objects are always passed ByRef
'2. r should be Dim-ed as a Range since it is a Range, and not a Variant
'3. I originally had these as Functions, but that way forces VBA to make copies of the strings
Paul,
you're right about point 1, my ByRef was superfluous.
About point 2 I'm not so sure. The r in the pvtFormatToSort sub was not meant to be a range but a value/member in the aryValues array. The r in that sub is a different r from that in the LetterNumberSort sub (scope and all that). I tried running your code and was immediately met with a ByRef argument type mismatch error, which I'm nigh on certain is because you've Dim-med it as a range.
Re. point 3, I'm going to have an explore of making them into functions, but later…