' Un Command Button à ajouter
Option Explicit
Private Function Deconcatenate(s As String, Optional delimiter As String = " " ) As String
Dim i As Long
i = InStr(s, delimiter)
Deconcatenate = Mid$(s, 1, i - 1)
End Function
Private Sub Command1_Click()
Dim szTest1 As String
Dim szTest2 As String
Dim retval1 As String
Dim retval2 As String
szTest1 = "Bonjour Monsieur"
szTest2 = "Bonjour;Monsieur"
retval1 = Deconcatenate(szTest1, " " )
retval2 = Deconcatenate(szTest2, ";" )
MsgBox retval1 & " " & retval2
End Sub
'Vala