View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Renate Renate is offline
external usenet poster
 
Posts: 5
Default Sort an array to use in a listbox on a userform in Excel 2007

Hi Joel,

I don't understand you last question. Why don't you always sort on the last
column?



Maybe I didn't explain it well enough. The real listbox get's filled
with all filenames in a specific folder. Each filename has a code
before it, it's a two letter and four digit code.
This code is followed by a description.
By default the listbox showes the names including the codes.
I want to add a checkbox on my form, that when the user selects it,
shows only the description in the listbox and sorts it ascending.

For example:
listbox sorted ascending with full filename
ab 1234 Description B
ab 6889 Description F
ab 8990 Description A

If I want only to show the descriptions and sort accordingly, it would
be:
Description A
Description B
Description F

The array contains the full filename in the first column and the
description in the second. I use that to fill the listbox.
Does this make more sense?