Recherche VBA
jade21
-
f894009 Messages postés 17414 Date d'inscription Statut Membre Dernière intervention -
f894009 Messages postés 17414 Date d'inscription Statut Membre Dernière intervention -
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
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
A voir également:
- Recherche VBA
- Recherche automatique des chaînes ne fonctionne pas - Guide
- Rechercher ou entrer l'adresse mm - recherche google - Guide
- Recherche image - Guide
- Je recherche une chanson - Guide
- Moteur de recherche 1fichier ✓ - Forum Réseaux sociaux