Reverse Items in an Array
Last weekend I spent several hours searching Excel's Help and the Internet trying to come up with a procedure to reverse the items in a one-dimensional array. I was using an array as the source for a listbox load and the loop below to load the items into the listbox:
For Each Item In Array1
frmTrace.ListBox1.AddItem Item
Next Item
Unfortunately this routine loads the data from low to high instead of high to low. After spinning my wheels, I posted my problem to the Microsoft Programming Newsgroup and it was solved within hours. I received three responses and all three worked. Below is the simplest correction:
For Each Item In Array1
frmTrace.ListBox1.AddItem Item, 0
Next Item
Thanks to those in the Programming Newsgroup who helped me with this.