Bonjour chers tous
je voudrais tester si mon code patient saisi en Textbox1 existe dans ma base.
je procède comme suit mais une erreur de syntaxe me reviens. Pouvez vous inspecter ma procédure et me corriger ?
Merci.
With Sheets("Prophylaxie")
If Application.WorksheetFunction.CountIf(.Range("A:A" & .Range("A" & Rows.Count).End(xlUp).Row + 1), TextBox1.Text) > 0 Then
MsgBox "Le patient " & TextBox1 & " est deja inscrit en Prophylaxie", 64
TextBox1 = ""
Exit Sub
End If
End With