1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| Private Sub ListBox1_Click()
With ThisWorkbook.Sheets("FACTURATION")
For Each Nom In .Range("=B8:B" & .[B65000].End(xlUp).Row)
If CStr(Nom) = CStr(Me.ListBox1.Value) Then
Me.TextBoxaffaire.Value = .Cells(Nom.Row, 2)
TextBoxbat.Value = .Cells(Nom.Row, 3)
Me.TextBoxchantier.Value = .Cells(Nom.Row, 4)
ComboBoxmatiere.Value = .Cells(Nom.Row, 5)
Me.TextBoxlargeur.Value = .Cells(Nom.Row, 6)
Me.TextBoxhauteur.Value = .Cells(Nom.Row, 7)
Me.TextBoxquantite.Value = .Cells(Nom.Row, 8)
Me.TextBoxm2.Value = .Cells(Nom.Row, 9)
Me.ComboBoxforme.Value = .Cells(Nom.Row, 10)
Me.ComboBoxfinition.Value = .Cells(Nom.Row, 11)
Me.ComboBoxaccessoires.Value = .Cells(Nom.Row, 12)
Me.ComboBoxproduits.Value = .Cells(Nom.Row, 13)
Me.TextBoxcommentaire.Value = .Cells(Nom.Row, 14)
Me.ComboBoxdivers.Value = .Cells(Nom.Row, 15)
Me.TextBoxcoutdivers.Value = .Cells(Nom.Row, 16)
Me.TextBoxcout.Value = .Cells(Nom.Row, 17)
End If
Next
End With
End Sub |
Partager