Before we go any further, let me ask you if you are sure you are using VB6 rather than a version of VB.Net (Visual Studio). I ask because the sort example your teacher gave you was not VB6.