Hi Marsha,
You see it sorted in Project Variables is because the Name column is sorted by default. You could write a routine to achieve this.
Try this:
Set arr = CreateObject("System.Collections.ArrayList")
log.AppendFolder "From Variables"
for i=0 to project.Variables.VariableCount-1
log.Message project.Variables.GetVariableName(i)
arr.Add project.Variables.GetVariableName(i)
next
log.PopLogFolder
arr.Sort()
arrList = arr.ToArray()
log.AppendFolder "Sorted Array"
for i=0 to UBound(arrList)
log.Message arrList(i)
next
log.PopLogFolder
You could refer to arrList in your keyword test for sorted variable list.