Private Sub UserForm_Initialize()
Dim syf As Worksheet, k As Byte
Dim Ekleme As String
istenmeyen = Array("", "ŞABLON", "Sayfa1","liste")
For k = 1 To UBound(istenmeyen, 1)
Ekleme = Ekleme & "|" & istenmeyen(k) & "|"
Next k
For Each syf In Worksheets
'ListBox daki listeyi görüntüleme'
If InStr(1, Ekleme, "|" & syf.Name & "|", 1) = 0 Then ComboBox1.AddItem syf.Name
atla:
Next syf
For a = 4 To Sheets.Count
ListBox1.AddItem Sheets(a).Name
'ListBox daki listeyi sıralama'
Dim vaItems As Variant
Dim i As Long, j As Long
Dim vTemp As Variant
'Put the items in a variant array
vaItems = Me.ListBox1.List
'Steal code from John Walkenbach’s Excel Power Programming
'with Vba to sort the array
For i = LBound(vaItems, 1) To UBound(vaItems, 1) - 1
For j = i + 1 To UBound(vaItems, 1)
If vaItems(i, 0) > vaItems(j, 0) Then
vTemp = vaItems(i, 0)
vaItems(i, 0) = vaItems(j, 0)
vaItems(j, 0) = vTemp
End If
Next j
Next i
'Clear the listbox
Me.ListBox1.Clear
'Add the sorted array back to the listbox
For i = LBound(vaItems, 1) To UBound(vaItems, 1)
Me.ListBox1.AddItem vaItems(i, 0)
Next i
Next
End Sub
dilerim işinize yarar