View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
DN DN is offline
external usenet poster
 
Posts: 12
Default Sorting a listbox

Hi,

I'm have a worksheet with lots of tabs in it. I'm using the code below to
populate a listbox with all the sheetnames, however I would like the results
sorted in alphabetal order. Any ideas would be much appreciated. Thanks!

Sub PopulateListbox()

ListBox1.Clear

For i = 1 To Sheets.Count

ListBox1.AddItem Sheets(i).Name

Next

End Sub