Provence Vintage
XLDnaute Occasionnel
Bonjour le Forum,
J'ai un bug dans mon code de recherche,
comment lui indiqué avec la valeur d'un combo, d'aller chercher dans le bdd sachant que la colonne est la n° 28????????
Merci à toutes et tous,
voici mon code:
#Private Sub CommandButton7_Click()
Dim cel As Range
Worksheets("bdd vendeur").Activate
Set cel = Range("A1")
Set cel = Columns(28).Find(What:=ComboBox5.Value, After:=cel, _
LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
If Not cel Is Nothing Then
L = cel.Row
TextBox1.Value = Cells(li, 1)
TextBox2.Value = Cells(li, 2)
TextBox3.Value = Cells(li, 4)
TextBox4.Value = Cells(li, 5)
TextBox5.Value = Cells(li, 6)
......
J'ai un bug dans mon code de recherche,
comment lui indiqué avec la valeur d'un combo, d'aller chercher dans le bdd sachant que la colonne est la n° 28????????
Merci à toutes et tous,
voici mon code:
#Private Sub CommandButton7_Click()
Dim cel As Range
Worksheets("bdd vendeur").Activate
Set cel = Range("A1")
Set cel = Columns(28).Find(What:=ComboBox5.Value, After:=cel, _
LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
If Not cel Is Nothing Then
L = cel.Row
TextBox1.Value = Cells(li, 1)
TextBox2.Value = Cells(li, 2)
TextBox3.Value = Cells(li, 4)
TextBox4.Value = Cells(li, 5)
TextBox5.Value = Cells(li, 6)
......