I think you could also use an array for your branches.

(untested and I've never used fnLDAPQuery... )
 Code:
Dim $Branches[3],$branch,$i,$x

$Branches[0]=fnLDAPQuery('computer','ou=Computer,ou=4th,dc=microsoft,dc=fabrikon,dc=com')
$Branches[1]=fnLDAPQuery('computer','ou=Computer,ou=8th,dc=microsoft,dc=fabrikon,dc=com')
$Branches[2]=fnLDAPQuery('computer','ou=Computer,ou=plov,dc=microsoft,dc=fabrikon,dc=com')
$Branches[3]=fnLDAPQuery('computer','ou=Computer,ou=Stevens,dc=microsoft,dc=fabrikon,dc=com')

;display each $Branch variable array list to test to see if works
For Each $branch in $branches
  $i=$i+1
  For each $x in $branch
    ;Display array list as test
    ? "" + $i + ":" + $x
  Next
Next


Edited by Allen (2008-12-03 09:23 PM)