Bonjour, Merci de m aider pour résoudre ce problème
Private Sub txtarticl_AfterUpdate()
If WorksheetFunction.CountIf(Sheets("Stock initial").Range("A:A"), Me.txtarticl.Value) = 0 Then
MsgBox "ce code est inexsitant, veuillez retapez un autre code", vbInformation + vbOKOnly, "code introuvable"
End If
With Me
.txtdesignation = Application.WorksheetFunction.VLookup(CLng(Me.txtarticl), Sheets("Stock initial").Range("Tableau_stock_hygiène"), 2, 0)
.txtstock = Application.WorksheetFunction.VLookup(CLng(Me.txtarticl), Sheets("Stock initial").Range("Tableau_stock_hygiène"), 3, 0)
End With
End Sub
Configuration: Windows / Chrome 89.0.4389.114
A voir également:
Erreur d'exécution 1004 impossible de lire la propriété VLookup de la classe Wof