すいません配列内でソート機能できないでしょうか?
たとえば構造体aをキーに指定とかcを指定にするといった具合です
typedef zzz
a as long
b as string
c as long
d as string
end type
Dim ppp(1000) as zzz