Re- Pimpin,
En partant de : En colonne A (Feuil1), j’ai des références
Voici un code qui réagit quand tu cliques sur le CommandButton
Private Sub CommandButton1_Click()
Dim x As Range
If TextBox1.Value <> "" Then
Set x = Range("A:A").Find(TextBox1, , xlValues, xlWhole, , , False)
If Not x Is Nothing Then
MsgBox "Ce code est déjà en : " & x.Address & vbLf & "Saisir un nouveau code Référence"
TextBox1 = ""
Cancel = True
Else
MsgBox "Ce code n'existe pas."
End If
End If
End Sub
Attachments:
You must be
logged in to view attached files.