sub bubbleSort(byref arr) dim count, i, j, bound, temp bound = uBound(arr) i = bound for count = 0 to bound j = 1 do while j <= i if arr(j - 1) > arr(j) then temp = arr(j - 1) arr(j - 1) = arr(j) arr(j) = temp end if j = j + 1 loop i = i - 1 next end sub