Option Explicit
Function SupprimerPoint(ByRef s As String) As String
Dim i As Long
Dim Pred As String, Succ As String, Chaine As String
Dim Pos As Long, L As Long
L = Len(s)
For i = 1 To L
Pos = InStr(i, s, "." )
If Pos > 0 Then
Pred = Mid(s, Pos - 1, 1)
Succ = Mid(s, Pos + 1, 1)
If Not IsNumeric(Pred) And Not IsNumeric(Succ) Then
Mid(s, Pos, 1) = " "
End If
i = Pos + 1
End If
Next i
SupprimerPoint = s
End Function |