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 CommandButton5_Click()
Selection.AutoFilter
Dim plage As Range, Cell As Range
Dim FL1 As Worksheet, critere As String
Set FL1 = Worksheets("Feuil1","Feuil2")
Set c = Cells.Find(What:=TextBox10.Value, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
On Error GoTo Erreur
If c = "" Then
UserForm1.Hide
End If
c.Activate 'active la cellule trouvée
Stock = ActiveCell.Offset(0, 2).Value 'décale pour trouver le stck
TextBox3.Value = Stock
Erreur:
End Sub |
Partager