xld,

now it shows a type mismatch error at

[vba]
If Lower = 0 Then Lower = LBound(SortArray, 1) [/vba]