Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub UserForm_Initialize()
- Dim i As Long
- Dim c As Byte
- Dim lstRw As Long
- Dim Sg As Worksheet
- Set Sg = ThisWorkbook.Sheets("Data")
- lstRw = Sg.Range("U" & Rows.Count).End(xlUp).Row
- For c = 65 To 90
- For i = 2 To lstRw
- If UCase(Sg.Cells(i, 1)) = Chr(c) Then
- Me.ListBox1.AddItem Sg.Cells(i, 1)
- End If
- Next i
- Next c
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement