Commande boutton
abdellah_tadjine
Messages postés
203
Statut
Membre
-
abdellah_tadjine Messages postés 203 Statut Membre -
abdellah_tadjine Messages postés 203 Statut Membre -
Bonjour,
dans mon formulaire userform j'ai un boutton de recherche en vba, qui fait une recherche de haut en bas . alors dans mon logiciel j'ai besoin d'une recherche de bas en haut.
voici le code vba
Private Sub CommandButton3_Click()
Dim no_ligne As Integer
no_ligne = ComboBox1.ListIndex + 2
TextBox1.Value = Cells(no_ligne, 1).Value
TextBox2.Value = Cells(no_ligne, 2).Value
TextBox3.Value = Cells(no_ligne, 3).Value
TextBox7.Value = Cells(no_ligne, 6).Value
TextBox6.Value = Cells(no_ligne, 5).Value
TextBox9.Value = Cells(no_ligne, 8).Value
TextBox10.Value = Cells(no_ligne, 15).Value
ComboBox5.Value = Cells(no_ligne, 13).Value
ComboBox4.Value = Cells(no_ligne, 4).Value
ComboBox3.Value = Cells(no_ligne, 10).Value
ComboBox2.Value = Cells(no_ligne, 7).Value
ComboBox7.Value = Cells(no_ligne, 11).Value
ComboBox6.Value = Cells(no_ligne, 12).Value
Sheets("priseencharge").Range("f20").Value = ComboBox7.Value
End Sub
dans mon formulaire userform j'ai un boutton de recherche en vba, qui fait une recherche de haut en bas . alors dans mon logiciel j'ai besoin d'une recherche de bas en haut.
voici le code vba
Private Sub CommandButton3_Click()
Dim no_ligne As Integer
no_ligne = ComboBox1.ListIndex + 2
TextBox1.Value = Cells(no_ligne, 1).Value
TextBox2.Value = Cells(no_ligne, 2).Value
TextBox3.Value = Cells(no_ligne, 3).Value
TextBox7.Value = Cells(no_ligne, 6).Value
TextBox6.Value = Cells(no_ligne, 5).Value
TextBox9.Value = Cells(no_ligne, 8).Value
TextBox10.Value = Cells(no_ligne, 15).Value
ComboBox5.Value = Cells(no_ligne, 13).Value
ComboBox4.Value = Cells(no_ligne, 4).Value
ComboBox3.Value = Cells(no_ligne, 10).Value
ComboBox2.Value = Cells(no_ligne, 7).Value
ComboBox7.Value = Cells(no_ligne, 11).Value
ComboBox6.Value = Cells(no_ligne, 12).Value
Sheets("priseencharge").Range("f20").Value = ComboBox7.Value
End Sub