I have this code that populates a Listbox with the sheets in the workbook.
I need a way to sort the items in the Listbox.
Code:Dim listbox1 As ListBox
For Each ws In ThisWorkbook.Sheets
If Not (ws.Name = "Data" Or ws.Name = "Index") _
Then Sheets("Index").listbox1.AddItem ws.Name
If ws.Index > 5 Then ws.Visible = False
Next
