Bonsoir, j’aimerai avoir votre aide
Je ne sais comment faire pour que le setfocus marchera.
Svp aidez moi
Je ne sais comment faire pour que le setfocus marchera.
Svp aidez moi
Code:
private Sub Tel_AfterUpdate()
Dim h As Double
Dim tablo
Dim strNum As String
Dim i As Byte
strNum = ""
If Not IsNumeric(Tel.Value) Then
Cancel = True ' Annule la validation de contrôle
MsgBox "Veuillez entrer un nombre !"
Else
With Tel
If Len(Tel.Value) > 0 Then
tablo = Split(Tel.Value, ".")
For i = LBound(tablo) To UBound(tablo)
If Len(tablo(i)) >= 10 Then
strNum = strNum & ", " & Format(tablo(i), "00"" ""00"" ""00"" ""00"" ""00")
Else:
MsgBox "message"
Tel.SetFocus
End If
Next i
End If
Tel.Value = Mid(strNum, 3)
End With
End If
End Sub