Scott Marchione 0 Newbie Poster

I have a VBS that I using to create a phone list..I've posted quite a few questions relating to it on these forumns, and have been getting some good feed back, so I thought I'd post one last question. I have a list of names that is pulled from my Active Directory, and I have found a way to alphabetize them (using a bubble sort). The names are in an array which I populated with only the first name and last name of the user, however my form is sorted by other attributes of the account...so question 1 is do I lose all the other attributes of the record that is being pulled when I place them in the array? and question 2 is how would I use the entries of the array in my if statement that is nested within a case statement?

Here is a sample of the code that I am using...

EnumerateUsers(oCont)
    Dim oUser   
    Dim arrNames()
    intSize = 0
    
    For Each oUser In oCont
    
    
   ' start bubble sort
        ReDim preserve arrNames(intsize)
        arrNames(intsize) = oUser.SN & ", " & oUser.GivenName
        intSize = intSize + 1
    Next
    
    For i = (UBound(arrNames) - 1) to 0 Step -1
        For j= 0 to i
            If UCase(arrNames(j)) > UCase(arrNames(j+1)) Then
            	strHolder = arrNames(j+1)
            	arrNames(j+1)=arrNames(j)
            	arrNames(j) = StrHolder
            End If	
    Next
      'end bubble sort, now all names are in alphabetical order by last name
    
    Select Case LCase(oUser.Class)
        Case "user"
            If oUser.telephoneNumber <> "" then
            If oUser.physicalDeliveryOfficeName = "Wixom" then
              
                If oUser.department = "Engineering" then
                    
                    sdata = "<tr>"
                    sdata = sdata & "<td class='list'>" & oUser.GivenName & " " & oUser.SN & "</td>"
                    sdata = sdata & "<td class='list'>" & oUser.telephoneNumber & "</td>" 
                    sdata = sdata & "</tr>"
                    
                    wixEng(wixEngRow) = sdata
                    'wixEngRow = wixEngRow
                    wixEngRow = wixEngRow + 1
                               
                 end if