bonjour a tous je reviens vers vous aujourd hui car j ai creer un vba qui marche sur une feuille et je veux la meme sur un autre feuille et la pas moyen la base est enorme 539531 ligne et les combobox ne m affiche que les 2 premieres si quelqu un peu m aider
Dim i As Byte
Private Sub ComboBox1_Change()
End Sub
Private Sub CommandButton1_Click()
For i = 1 To 7: Controls("Textbox" & i) = "": Next (c est la que ca merde)
With Sheets("BASE")
For i = 2 To .Range("A539531").End(xlUp).Row
If .Range("A" & i) = ComboBox1 And .Range("B" & i) = ComboBox2 Then
TextBox1 = .Range("E" & i)
TextBox2 = .Range("I" & i)
TextBox3 = .Range("F" & i)
TextBox4 = .Range("G" & i)
End If
Next i
End With
If TextBox1 = "" Then MsgBox "pas trouve de reference correspondant a la recherche"
End Sub
Private Sub UserForm_Initialize()
With Sheets("BASE"): ComboBox1.List = Range(.[A2], .[A539531].End(xlUp)).Value: End With
With Sheets("BASE"): ComboBox2.List = Range(.[B2], .[B539531].End(xlUp)).Value: End With
End Sub
Dim i As Byte
Private Sub ComboBox1_Change()
End Sub
Private Sub CommandButton1_Click()
For i = 1 To 7: Controls("Textbox" & i) = "": Next (c est la que ca merde)
With Sheets("BASE")
For i = 2 To .Range("A539531").End(xlUp).Row
If .Range("A" & i) = ComboBox1 And .Range("B" & i) = ComboBox2 Then
TextBox1 = .Range("E" & i)
TextBox2 = .Range("I" & i)
TextBox3 = .Range("F" & i)
TextBox4 = .Range("G" & i)
End If
Next i
End With
If TextBox1 = "" Then MsgBox "pas trouve de reference correspondant a la recherche"
End Sub
Private Sub UserForm_Initialize()
With Sheets("BASE"): ComboBox1.List = Range(.[A2], .[A539531].End(xlUp)).Value: End With
With Sheets("BASE"): ComboBox2.List = Range(.[B2], .[B539531].End(xlUp)).Value: End With
End Sub