Selection rows +4 ligne dans userform

Résolu/Fermé
patbl Messages postés 83 Date d'inscription mardi 25 septembre 2007 Statut Membre Dernière intervention 19 mai 2010 - 18 mai 2010 à 15:29
patbl Messages postés 83 Date d'inscription mardi 25 septembre 2007 Statut Membre Dernière intervention 19 mai 2010 - 19 mai 2010 à 22:16
Bonjour,

je voudrais selectionner la ligne de mon combobox mais c'est la 4è
dans l'userform
 Dim Cell As Range


ComboBox1.Clear
For Each Cell In Sheets("pat").Range("A4:A" & Range("A65536").End(xlUp).Row)

 ComboBox1 = Cell
    
 If (ComboBox1.ListIndex) = -1 Then _
      ComboBox1.AddItem Cell
      
Next Cell
end sub


dans le combobox
rows((ComboBox1.ListIndex) + 4).Select


ceci passe à la 2eme ligne or que je voudrais selectionne ma 4eme
je suis sur excel 2000


A voir également:

1 réponse

patbl Messages postés 83 Date d'inscription mardi 25 septembre 2007 Statut Membre Dernière intervention 19 mai 2010 4
19 mai 2010 à 22:16
Dim a As Integer
Dim cherche As String
cherche = ComboBox1.Value
a = Cells.Find(What:=cherche, LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlNext).Row
rows(a).Select
0