bonjour
Je me présente Cédric
je galère sur un code qui me génère une erreur
j ai fait un formulaire avec combobox et textbox
lorsque je sélectionne un numéro dans la combobox cela m affiche bien dans le textbox les bonnes informations
par contre lorsque je tape un numéro qui n est pas dans la liste déroulante de la combobox, cela me génère l erreur 91
dans mon userform j ai ce code:
If cb_No_annuaire = -1 Then Exit Sub
Set FL = ThisWorkbook.Sheets("liste_PNIA")
ligne = FL.Range("A10000").End(xlUp).Row
For I = 2 To ligne
With Me.cb_No_annuaire
.AddItem FL.Range("A" & I)
End With
Next I
pour la liste déroulante
et dans la combobox j ai ce code pour afficher tout ce que je veux dans les textbox
If cb_No_annuaire = -1 Then Exit Sub
With Workbooks("Annuaire BA123.xlsm").Worksheets("liste_PNIA")
lign = .Columns(1).Cells.Find(cb_No_annuaire, LookIn:=xlValues).Row
CB_noeud = .Cells(lign, 2)
TB_nom_annuaire = .Cells(lign, 3)
TB_prenom_annuaire = .Cells(lign, 4)
TB_alveole = .Cells(lign, 5)
TB_carte_interface = .Cells(lign, 6)
TB_equipement = .Cells(lign, 7)
CB_Postes = .Cells(lign, 8)
CB_entite = .Cells(lign, 9)
CB_CDF = .Cells(lign, 10)
TB_public = .Cells(lign, 11)
TB_Cat_expl = .Cells(lign, 12)
TB_Cat_connexion = .Cells(lign, 13)
TB_Multiligne = .Cells(lign, 14)
TB_Table_acheminement = .Cells(lign, 15)
TB_cat_rest_appel = .Cells(lign, 16)
TB_cat_rest_activable = .Cells(lign, 17)
TB_Liste_GFU = .Cells(lign, 18)
TB_GFU_pref = .Cells(lign, 19)
CB_AS_GFU = .Cells(lign, 20)
CB_AE_GFU = .Cells(lign, 21)
TB_RSI_associe = .Cells(lign, 22)
TB_NUM_DANS_GROUPE = .Cells(lign, 23)
TB_SDA = .Cells(lign, 24)
bien évidemment les deux fonctionnent bien individuellement mais combinés, erreur 91
s'il y a une âme charitable pour me dédouaner merci d avance