Bonjour,
J'ai un USF, comprenant TextBox et ComBobox je suis à la recherche d'un code pour trie alpha dans une ComBobox
Un très grand merci à tout ceux qui pourront m'aider...
Ci-dessous mon code
Cordialement
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 ' Chois par Combobox Private Sub Combobox1_Click() Dim lign As Long If ComboBox1.Value <> "" Then lign = ComboBox1.ListIndex + 3 txtPrenom.Value = Range("b" & lign).Value TextTel.Value = Range("c" & lign).Value TextMob.Value = Range("d" & lign).Value TextBur.Value = Range("e" & lign).Value TextFax.Value = Range("f" & lign).Value txtAdresse.Value = Range("g" & lign).Value txtCp.Value = Range("h" & lign).Value txtCommune.Value = Range("i" & lign).Value 'txtDepartement.Value = Range("j" & lign).Value 'TextBox3.Value = Range("k" & lign).Value 'Email End If txtNom.Value = ComboBox1.Value ' Copie combobox vers txtPrenom End Sub Private Sub CommandButton1_Click() Unload Me End Sub Private Sub UserForm_Initialize() Dim Cell As Range With Sheets("Repertoire") For Each Cell In .Range("A3:A" & .Range("A65536").End(xlUp).Row) Me.ComboBox1.AddItem (Cell) Next End Sub
Max
Partager