La funzione String.Split divide la stringa in base a un carattere separatore:
codice:
Dim Str(5) As String
Str(0) = ("ciao") & vbCrLf 'ded
Str(1) = ("Pippa") & vbCrLf 'ded
Str(2) = ("Tio") & vbCrLf 'ded
Str(3) = ("zio") & vbCrLf 'ded
Str(4) = ("cino") & vbCrLf 'ded
'-----spedisco tramite un SendMessage
SendMessage(Str(0) & Str(1) & Str(2) & Str(3) & Str(4) & Str(5))
'Alla ricezione
Dim ReceivedMessage As String 'Messaggio ricevuto
Dim Parts() As String
'Divide il messaggio in base a vbCrLf
Parts = ReceivedMessage.Split(vbCrLf)
'Quindi Parts(0) sarà "ciao", Parts(1) "Pippa" eccetera