Recherche VBA

Bonjour,
J'ai créer une fonction recherche dans mon userform par rapport à une ComboBox (REX) qui trouve ses valeurs dans ma colonne B. Voici ma formule :
Private Sub CommandButton10_Click()
Dim a As Integer
Dim cherche As String
cherche = REF.Value
a = Cells.Find(What:=cherche, LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlNext).Row
ComboBox_Manager = Cells(a, 1)
TextBox_Client = Cells(a, 2)
TextBox_Fonction = Cells(a, 5)
TextBox_Tél = Cells(a, 6)
TextBox_Mail = Cells(a, 7)
TextBox_Ville = Cells(a, 3)
ComboBox_Departement = Cells(a, 8)
TextBox_Commentaires = Cells(a, 12)
ComboBox_Secteur = Cells(a, 9)
TextBox_Génie = Cells(a, 10)
ComboBox_Métier = Cells(a, 11)
TextBox_Profil = Cells(a, 13)
ComboBox_Métier = Cells(a, 14)
TextBox_Expérience = Cells(a, 15)
TextBox_Outils = Cells(a, 16)
TextBox_Prospecté = Cells(a, 17)
TextBox_Qualifications = Cells(a, 18)
TextBox_Businessactuel = Cells(a, 19)
TextBox_Businessantérieur = Cells(a, 20)

End Sub

La ligne "a = Cells.Find(What:=cherche, LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlNext).Row" est surlignée en jaune. Je ne sais pas comment faire parce que cette formule fonctionnait au début.

Merci d'avance

2 réponses

  • Votes
  • Date
  • Date décroissante
  1. Bonjour,

    cherche = REF.Value

    Ce que vous cherchez existe ou pas? Si pas: normal qu'il y ait erreur
    1. Ma ComboBox s'appelle REF et il y a des données dans la colonne donc oui ca existe...
      1. Re,

        donc oui ca existe...
        En etes vous sure??
        Quand vous avez l'erreur, clic sur debugage et passez le curseur souris sur cherche